X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Finfostreet.pm;h=f2d5199327e65d9519732bea9a51d38ea572e872;hb=7a94fd2dd84ccb204e97e8cbd9ce4162e93fd12e;hp=2464e5deef0d34311c9e84e72c8a8bed2b1f7467;hpb=835228e1989d99fabc2689363aa174d41440188d;p=freeside.git diff --git a/FS/FS/part_export/infostreet.pm b/FS/FS/part_export/infostreet.pm index 2464e5dee..f2d519932 100644 --- a/FS/FS/part_export/infostreet.pm +++ b/FS/FS/part_export/infostreet.pm @@ -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} ); } } @@ -164,6 +164,15 @@ sub infostreet_command { #subroutine, not method } eval "use Frontier::Client;"; + die $@ if $@; + + eval 'sub Frontier::RPC2::String::repr { + my $self = shift; + my $value = $$self; + $value =~ s/([&<>\"])/$Frontier::RPC2::char_entities{$1}/ge; + $value; + }'; + die $@ if $@; my $conn = Frontier::Client->new( url => $url ); my $key_result = $conn->call( 'authenticate', $username, $password, $groupID); @@ -172,7 +181,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};