diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /bin/xmlrpc-agent_new_customer.pl | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'bin/xmlrpc-agent_new_customer.pl')
-rwxr-xr-x | bin/xmlrpc-agent_new_customer.pl | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/bin/xmlrpc-agent_new_customer.pl b/bin/xmlrpc-agent_new_customer.pl deleted file mode 100755 index 761fcdf6e..000000000 --- a/bin/xmlrpc-agent_new_customer.pl +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/perl -# -# xmlrpc-agent_new_customer.pl username password - -use strict; -use Frontier::Client; -use Data::Dumper; - -my( $username, $password ) = ( @ARGV ); - -my $uri = new URI 'http://localhost/selfservice/xmlrpc.cgi'; - -my $server = new Frontier::Client ( 'url' => $uri ); - - -### -# login -### - -my $login_result = $server->call('FS.SelfService.XMLRPC.agent_login', - { - 'username' => $username, - 'password' => $username, - } -); - -die $login_result->{'error'} if $login_result->{'error'}; - -my $session_id = $login_result->{'session_id'}; -warn "logged in w/session_id $session_id\n"; - - -### -# new_customer -### - -my $result = $server->call('FS.SelfService.XMLRPC.new_customer', - { - 'session_id' => $session_id, - #customer informaiton - 'first' => 'Tofu', - 'last' => 'Beast', - 'address1' => '1234 Soybean Ln.', - 'city' => 'Tofutown', - 'state' => 'CA', - 'zip' => '54321', - 'country' => 'US', - 'invoicing_list' => 'tofu@example.com', - #billing information - 'payby' => 'CARD', - 'payinfo' => '4111111111111111', - 'paycvv' => '123', - 'paydate' => '11/2012', - #package information - 'pkgpart' => '2', - 'username' => 'tofu', - '_password' => 's33kret', - } -); - -die $result->{'error'} if $result->{'error'}; - -my $custnum = $result->{'custnum'}; -warn "added new customer w/custnum $custnum\n"; - - -### -# logout -### - -my $logout_result = $server->call('FS.SelfService.XMLRPC.agent_logout', - { - 'session_id' => $session_id, - } -); - -die $logout_result->{'error'} if $logout_result->{'error'}; -warn "logged out\n"; - -1; |