[freeside-commits] branch FREESIDE_3_BRANCH updated. 2a465dba420cb89d0492e3dd0b184ec399ef2c40

Jeremy Davis jeremyd at 420.am
Tue May 19 09:56:56 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  2a465dba420cb89d0492e3dd0b184ec399ef2c40 (commit)
      from  800328ef3d6ef9938a97fc8fd0af8c0d1f64bcad (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2a465dba420cb89d0492e3dd0b184ec399ef2c40
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Tue May 19 12:56:48 2015 -0400

    Example process_payment xmlrpc script

diff --git a/bin/xmlrpc-customer_login_pay b/bin/xmlrpc-customer_login_pay
new file mode 100644
index 0000000..a867a69
--- /dev/null
+++ b/bin/xmlrpc-customer_login_pay
@@ -0,0 +1,50 @@
+#!/usr/bin/perl
+
+use strict;
+use Frontier::Client;
+use Data::Dumper;
+
+my( $username, $password ) = ( @ARGV );
+
+my $uri = new URI 'http://localhost:8080/';
+
+my $server = new Frontier::Client ( 'url' => $uri );
+
+my $result = $server->call('FS.ClientAPI_XMLRPC.login',
+
+	'email'    => 'joe at test.com',
+        'password' => 'testpass',
+);
+
+die $result->{'error'} if $result->{'error'};
+
+my $session_id = $result->{'session_id'};
+warn "$session_id";
+
+my $process_payment = $server->call('FS.ClientAPI_XMLRPC.process_payment',
+
+        # Required fields
+	'session_id'  => $session_id,
+	'amount'      => '1.00',
+        'payname'     => 'Joe Tester',
+	'payinfo'     => '4111111111111111',
+	'month'       => '1', # CC Expiration month
+	'year'	      => '2019', # CC Expiration year
+
+  	#Optional fields (Only needed which these are not set on the customers account or when new information needs to be saved)
+	'save'	      => 1, # Save this information to the customers account
+	'auto'	      => 1, # Set this customers account to "automatic" payment type
+	'address1'    => '1234 Testerville Rd',
+	'address2'    => '',
+	'city'        => 'Testerville',
+	'state'       => 'MD',
+	'zip'         => '12345',
+	'country'     => 'US',
+	
+
+
+);	
+
+die $process_payment->{'error'} if $process_payment->{'error'};
+
+1;

-----------------------------------------------------------------------

Summary of changes:
 bin/xmlrpc-customer_login_pay |   50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 bin/xmlrpc-customer_login_pay




More information about the freeside-commits mailing list