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bpo ̊t+zUYV[v _<j:y@o]W ke?n'Ͽ> KsbD+{+QҼc2oPS[B#z3N;{'f[FQy{Kfx }|eV[5&}9#F6ȁ,~WrvvK@ \eժu7Ȧ3*9տ~ҤbbSY, ^#o޴k1s4jX#_[]yZ =}RJ#S@AD,N;u[V43,Q35=W/1&VB`Ҿp| \z"F#1z5?h.4#II'c)]4W{s=awa8539q֞V; kԝ}ڈ` 8-Z9&:;.)[ڵx(eY`etD!½2Ux&FEJGPu;egntu|7ֶSM˖ -(eMZ 凼m+sZ8˕h Q9vr=>:ah*TuԾxHS@<@5'5,ŴuCgha%&rRᛗ=񽟿J#{iskh(ʘ4:T٧eY@)<&zA{?>F-A`ˈߴ҈Bp/o~EUY?cwY"M˙4eʝ8ע M75'o4=n2ؗqI# rïl'L3k U[sq\Kl܅eQh\4La?&g>9 [(`B\\&nԛvD?9%D,jw0}04;V>.r8C~_+҂ 20Xsuwg)L!@G*;K퉹 =^ ;?sA?PTJA PihIu#kk n9uFX9Fe$W/͆M[&dHvmcM8JdIZ5Z1;F:dGG1FEJQ瑵d4q<0;lhMP x*t^RbE>PK0|]6ANqVK?? KI4BSIENDB`PNG  IHDRasBIT|d pHYs  ~tEXtSoftwareAdobe Fireworks CS4ӠtEXtCreation Time12/08/09fIDAT8S_HSq=ˉ۵Y6K`RID! |)0C/CȤR@TX֜Kv뼻_oA*Ax{9|GBJ ײf .jki:`0r:L`0X]WW~Aii)rVӕ;Fe*V+X,h44ο <߬둙 $ V(alll`zz 4<Ϗd2AQ4 QD(  PbTkN[:*Rb65D& @eb1 H&PU,˂r)ABp}Z$==b4aPXXh4 A旖"j$yFFYCQagWE99s@`8IQW4}zP?Yy:T?uЛت쪩 O|I?gB́C"Bz|ާvBWo GqIENDB`package HostingBilling::MT::Billing::XMLRPC::Subscription; ## TODO: create wrapper for RPC::XML ## to handle errors in common maner use strict; use warnings; use lib $ENV{'DIRBG_ROOT'}.'/lib/host.dir.bg/perl', $ENV{'DIRBG_ROOT'}.'/lib/common/perl'; use RPC::XML; use RPC::XML::Client; use Common::Core::Result; use Common::Core::Constants; use Common::CommonLib; use HostingBilling::System; use HostingBilling::Config; use Data::Dumper; sub new { my $class = shift || die("Bad class initialization"); my $self = {}; bless($self, $class); $self->{'__RPC_client'} = RPC::XML::Client->new(XMLRPC_BILLING_URI, ( error_handler => sub { warn "EH:".Dumper($self->{'__RPC_client'}->{'__response_raw'}) }, fault_handler => sub { warn "FH:".Dumper \@_ }, combined_handler => sub { warn "CH:".Dumper \@_ }, )); return $self; } ## Returned value: ref to hash sub getSubscriptionData { my $self = shift or die ("Bad method call!"); my %args = ( 'subscr_id' => undef, @_ ); die("subscr id should be specified!") unless $args{'subscr_id'}; my $response = $self->{'__RPC_client'}->simple_request( 'export.getSubscriptionData', RPC::XML::int->new($args{'subscr_id'}), ); unless( ref $response ) { die("ERROR: $RPC::XML::ERROR"); } if( defined $response->{'faultCode'} ) { die("RPC ERROR: $response->{faultString}"); } unless( exists $response->{'res_code'} ) { use Data::Dumper; die("Strange result given: ".Dumper($response)); } return new Common::Core::Result( %$response ) if( $response->{'res_code'} != RC_OK ); return new Common::Core::Result( 'res_code'=>RC_ERROR, 'err_code'=>'bad_result', 'err_msg'=>"Bad data structure received!" ) if( !defined $response->{'data'} ); ##print Dumper $response; return $self->_unchecksum_result( $response ); } ## Returned value: ref to list sub getSubscriptionsDataList { my $self = shift or die ("Bad method call!"); my %args = ( 'subscr_id_list' => undef, @_ ); die("subscr id list should be specified!") unless $args{'subscr_id_list'}; my $response = $self->{'__RPC_client'}->simple_request( 'export.getSubscriptionsDataList', RPC::XML::array->new($args{'subscr_id_list'}), ); unless( ref $response ) { die("ERROR: $RPC::XML::ERROR"); } if( defined $response->{'faultCode'} ) { die("RPC ERROR: $response->{faultString}"); } unless( exists $response->{'res_code'} ) { use Data::Dumper; die("Strange result given: ".Dumper($response)); } return new Common::Core::Result( %$response ) if( $response->{'res_code'} != RC_OK ); return new Common::Core::Result( 'res_code'=>RC_ERROR, 'err_code'=>'bad_result', 'err_msg'=>"Bad data structure received!" ) if( !defined $response->{'data'} ); return $self->_unchecksum_result( $response ); } ## Parameters: subscr_id, ref to array service_code => status sub updateSubscriptionServiceStatus { my $self = shift or die ("Bad method call!"); my %args = ( 'subscr_id' => undef, 'status' => undef, @_ ); die("subscr id should be specified!") unless $args{'subscr_id'}; die("status array should be specified!") unless $args{'status'}; die "Empty status array given!" unless scalar @{$args{'status'}}; my $response = $self->{'__RPC_client'}->simple_request( 'import.updateSubscriptionServiceStatus', RPC::XML::array->new([$args{'subscr_id'}, $args{'status'}]), ); unless( ref $response ) { use Data::Dumper; print Dumper ['import.updateSubscriptionServiceStatus', [$args{'subscr_id'}, $args{'status'}]]; die("ERROR: $RPC::XML::ERROR"); } if( defined $response->{'faultCode'} ) { die("RPC ERROR: $response->{faultString}"); } unless( exists $response->{'res_code'} ) { use Data::Dumper; die("Strange result given: ".Dumper($response)); } return new Common::Core::Result( %$response ) if( $response->{'res_code'} != RC_OK ); return $self->_unchecksum_result( $response ); } ## Parameters: subscr_id, domain .com expire date sub updateComSubscriptionExpireDate { my $self = shift or die ("Bad method call!"); my %args = ( 'subscr_id' => undef, 'expire_date' => undef, @_ ); die("subscr id should be specified!") unless $args{'subscr_id'}; die("expire_date array should be specified!") unless $args{'expire_date'}; my $response = $self->{'__RPC_client'}->simple_request( 'import.updateComSubscriptionExpireDate', RPC::XML::array->new([$args{'subscr_id'}, $args{'expire_date'}]), ); unless( ref $response ) { die("ERROR: $RPC::XML::ERROR"); } if( defined $response->{'faultCode'} ) { die("RPC ERROR: $response->{faultString}"); } unless( exists $response->{'res_code'} ) { use Data::Dumper; die("Strange result given: ".Dumper($response)); } return new Common::Core::Result( %$response ) if( $response->{'res_code'} != RC_OK ); return $self->_unchecksum_result( $response ); } sub getServiceResourcesList { my $self = shift or die ("Bad method call!"); my %args = ( 'service_id' => undef, 'service_code' => undef, @_ ); die("service id or service code should be specified!") unless( $args{'service_id'} || $args{'service_code'} ); my $response = $self->{'__RPC_client'}->simple_request( 'export.getServiceResourcesList', RPC::XML::struct->new(\%args), ); unless( ref $response ) { die("ERROR: $RPC::XML::ERROR"); } if( defined $response->{'faultCode'} ) { die("RPC ERROR: $response->{faultString}"); } unless( exists $response->{'res_code'} ) { use Data::Dumper; die("Strange result given: ".Dumper($response)); } return new Common::Core::Result( %$response ) if( $response->{'res_code'} != RC_OK ); return $self->_unchecksum_result( $response ); } sub _unchecksum_result { my $self = shift; my $response = shift or die "Bad function call!"; return new Common::Core::Result( %$response ) unless defined $response->{'data'}; ## verify check sum if( $response->{'data'} && defined $response->{'data'}->{'data'} && defined $response->{'data'}->{'check_sum'} ) { my $data = $response->{'data'}->{'data'}; # my $sent_cs = $response->{'data'}->{'check_sum'}; # reset_cvl(); # my $received_cs = calc_cvl_struct( $data ); #warn "$sent_cs vs $received_cs"; #print Dumper $data; # if( $sent_cs!=$received_cs ) { # return new Common::Core::Result( 'res_code'=>RC_ERROR, 'err_code'=>'bad_check_sum', 'err_str'=>'Sent and received check sums are not matched' ); # } # else { return new Common::Core::Result( 'res_code'=>RC_OK, 'data'=>$data ); # } } else { return new Common::Core::Result( %$response ); } } 1; PNG  IHDR<@FsBIT|d pHYs  ~tEXtCreation Time01/18/10YetEXtSoftwareAdobe Fireworks CS4ӠIDATh[k$unϾ0 Da q0"k8AD!8A"aA )2`P6YPlcEH8bkvkU*?ϝav]'SR_;|۬**~هK-vG&'jaf8v\&8`vV81xv c N @1=t]mnnNۺuklƠJ:Yd!yrOf]v];\?֪,As]7t(˒8r׿18 c X*c HzO? ,,`dY,˰,k|Im89?M6Ν;_00]`9iWjK/ux[0C06ضVI(`AUUTU$I9LD׃$IQ}h]7M.?cd魷~w^}eq۶*4Me@40$IPUi<σa|G(Ӷm`b&䵴}?~몪ʆa@QH]ס*Lӄ4 B$z=dYIBQ ""i 90E{'g lKX0;q/nn5 eAUUȲ 4na6,BC$ sض 4( ($I4 A( x4MYUfggn} 3L>Mk^z0:;C!˲`Y4M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