X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Finfostreet.pm;h=89ab06d22ab9d7c67ed7000f2075857c581aa771;hp=8a68a2077e5aeaccba95470407feb31f31e81143;hb=5939c0f1ae7bea08adde82f6d3578e6c5ac31248;hpb=29bb6991a3b7187784cd14a3806b0c9db38dd51b diff --git a/FS/FS/part_export/infostreet.pm b/FS/FS/part_export/infostreet.pm index 8a68a2077..89ab06d22 100644 --- a/FS/FS/part_export/infostreet.pm +++ b/FS/FS/part_export/infostreet.pm @@ -1,11 +1,13 @@ package FS::part_export::infostreet; -use vars qw(@ISA %infostreet2cust_main); +use vars qw(@ISA %infostreet2cust_main $DEBUG); use FS::UID qw(dbh); use FS::part_export; @ISA = qw(FS::part_export); +$DEBUG = 0; + %infostreet2cust_main = ( 'firstName' => 'first', 'lastName' => 'last', @@ -141,9 +143,9 @@ sub infostreet_setContact { my($url, $is_username, $is_password, $groupID, $username, %contact_info) = @_; my $accountID = infostreet_command($url, $is_username, $is_password, $groupID, 'getAccountID', $username); - foreach my $field ( %contact_info ) { + foreach my $field ( keys %contact_info ) { infostreet_command($url, $is_username, $is_password, $groupID, - 'setContactField', $field, $contact_info{$field} ); + 'setContactField', $accountID, $field, $contact_info{$field} ); } } @@ -151,6 +153,8 @@ sub infostreet_setContact { sub infostreet_command { #subroutine, not method my($url, $username, $password, $groupID, $method, @args) = @_; + warn "[FS::part_export::infostreet] $method ".join(' ', @args)."\n" if $DEBUG; + #quelle hack if ( $method =~ /,/ ) { foreach my $part ( split(/,\s*/, $method) ) {