X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Finfostreet.pm;h=fbf58bd603d5a680b15658afe343c6aa6c8d7dcd;hb=46b6aae489f468a46be6c66f8ae6da48b41fe70c;hp=89ab06d22ab9d7c67ed7000f2075857c581aa771;hpb=5939c0f1ae7bea08adde82f6d3578e6c5ac31248;p=freeside.git diff --git a/FS/FS/part_export/infostreet.pm b/FS/FS/part_export/infostreet.pm index 89ab06d22..fbf58bd60 100644 --- a/FS/FS/part_export/infostreet.pm +++ b/FS/FS/part_export/infostreet.pm @@ -50,7 +50,7 @@ sub _export_insert { $contact_info{'email'} = $emails[0] if @emails; #this one is kinda noment-specific - $contact_info{'title'} = $cust_main->agent->agent; + $contact_info{'organization'} = $cust_main->agent->agent; $err_or_queue = $self->infostreet_queueContact( $svc_acct->svcnum, $svc_acct->username, %contact_info ); @@ -145,7 +145,7 @@ sub infostreet_setContact { 'getAccountID', $username); foreach my $field ( keys %contact_info ) { infostreet_command($url, $is_username, $is_password, $groupID, - 'setContactField', $accountID, $field, $contact_info{$field} ); + 'setContactField', [ 'int'=>$accountID ], $field, $contact_info{$field} ); } } @@ -165,6 +165,13 @@ sub infostreet_command { #subroutine, not method eval "use Frontier::Client;"; + eval 'sub Frontier::RPC2::String::repr { + my $self = shift + my $value = $$self; + $value =~ s/([&<>\"])/$Frontier::RPC2::char_entities{$1}/ge; + $value; + }'; + my $conn = Frontier::Client->new( url => $url ); my $key_result = $conn->call( 'authenticate', $username, $password, $groupID); my %key_result = _infostreet_parse($key_result); @@ -172,7 +179,15 @@ sub infostreet_command { #subroutine, not method my $key = $key_result{data}; #my $result = $conn->call($method, $key, @args); - my $result = $conn->call($method, $key, map { $conn->string($_) } @args); + my $result = $conn->call( $method, $key, + map { + if ( ref($_) ) { + my( $type, $value) = @{$_}; + $conn->$type($value); + } else { + $conn->string($_); + } + } @args ); my %result = _infostreet_parse($result); die $result{error} unless $result{success};