diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-03-05 17:39:57 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-03-05 17:39:57 -0800 |
commit | f3853d3ed85d993f6bc058747d338fcbf344cb61 (patch) | |
tree | c3ea3fd70c0a7b7a13498e091f27b5a0d2d11e3a /bin | |
parent | 7a7a0c736e3cfbd10b06151a93bf499d185d37d3 (diff) |
API methods to insert payments & credits (and look them up via phonenum), RT#27958
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/xmlrpc-insert_credit_phonenum | 25 | ||||
-rwxr-xr-x | bin/xmlrpc-insert_payment | 26 | ||||
-rwxr-xr-x | bin/xmlrpc-insert_payment_phonenum | 26 | ||||
-rwxr-xr-x | bin/xmlrpc-insert_refund_phonenum | 26 |
4 files changed, 103 insertions, 0 deletions
diff --git a/bin/xmlrpc-insert_credit_phonenum b/bin/xmlrpc-insert_credit_phonenum new file mode 100755 index 000000000..a8774a45b --- /dev/null +++ b/bin/xmlrpc-insert_credit_phonenum @@ -0,0 +1,25 @@ +#!/usr/bin/perl + +use strict; +use Frontier::Client; +use Data::Dumper; + +my $uri = new URI 'http://localhost:8008/'; + +my $server = new Frontier::Client ( 'url' => $uri ); + +my $result = $server->call( + 'FS.API.insert_credit_phonenum', + 'secret' => 'sharingiscaring', + 'phonenum' => '3125550001', + 'amount' => '54.32', + + #optional + '_date' => 1397977200, #UNIX timestamp +); + +#die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +1; diff --git a/bin/xmlrpc-insert_payment b/bin/xmlrpc-insert_payment new file mode 100755 index 000000000..a0d60fd17 --- /dev/null +++ b/bin/xmlrpc-insert_payment @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +use strict; +use Frontier::Client; +use Data::Dumper; + +my $uri = new URI 'http://localhost:8008/'; + +my $server = new Frontier::Client ( 'url' => $uri ); + +my $result = $server->call( + 'FS.API.insert_payment', + 'secret' => 'sharingiscaring', + 'custnum' => 181318, + 'payby' => 'CASH', + 'paid' => '54.32', + + #optional + '_date' => 1397977200, #UNIX timestamp +); + +#die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +1; diff --git a/bin/xmlrpc-insert_payment_phonenum b/bin/xmlrpc-insert_payment_phonenum new file mode 100755 index 000000000..21f01f05b --- /dev/null +++ b/bin/xmlrpc-insert_payment_phonenum @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +use strict; +use Frontier::Client; +use Data::Dumper; + +my $uri = new URI 'http://localhost:8008/'; + +my $server = new Frontier::Client ( 'url' => $uri ); + +my $result = $server->call( + 'FS.API.insert_payment_phonenum', + 'secret' => 'sharingiscaring', + 'phonenum' => '3125550001', + 'payby' => 'CASH', + 'paid' => '54.32', + + #optional + '_date' => 1397977200, #UNIX timestamp +); + +#die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +1; diff --git a/bin/xmlrpc-insert_refund_phonenum b/bin/xmlrpc-insert_refund_phonenum new file mode 100755 index 000000000..bdcd50459 --- /dev/null +++ b/bin/xmlrpc-insert_refund_phonenum @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +use strict; +use Frontier::Client; +use Data::Dumper; + +my $uri = new URI 'http://localhost:8008/'; + +my $server = new Frontier::Client ( 'url' => $uri ); + +my $result = $server->call( + 'FS.API.insert_refund_phonenum', + 'secret' => 'sharingiscaring', + 'phonenum' => '3125550001', + 'payby' => 'CASH', + 'refund' => '54.32', + + #optional + '_date' => 1397977200, #UNIX timestamp +); + +#die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +1; |