7 my( $username, $password ) = ( @ARGV );
9 my $uri = new URI 'http://localhost:8080/';
11 my $server = new Frontier::Client ( 'url' => $uri );
13 my $result = $server->call('FS.ClientAPI_XMLRPC.login',
15 'email' => 'joe@test.com',
16 'password' => 'testpass',
19 die $result->{'error'} if $result->{'error'};
21 my $session_id = $result->{'session_id'};
24 my $process_payment = $server->call('FS.ClientAPI_XMLRPC.process_payment',
27 'session_id' => $session_id,
29 'payname' => 'Joe Tester',
30 'payinfo' => '4111111111111111',
31 'month' => '1', # CC Expiration month
32 'year' => '2019', # CC Expiration year
34 #Optional fields (Only needed which these are not set on the customers account or when new information needs to be saved)
35 'save' => 1, # Save this information to the customers account
36 'auto' => 1, # Set this customers account to "automatic" payment type
37 'address1' => '1234 Testerville Rd',
39 'city' => 'Testerville',
48 die $process_payment->{'error'} if $process_payment->{'error'};