summaryrefslogtreecommitdiff
path: root/bin/xmlrpc-insert_payment
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-03-05 17:40:00 -0800
committerIvan Kohler <ivan@freeside.biz>2014-03-05 17:40:00 -0800
commitc2fdce8923a09f4a586323adbb7bd0f0dfc587f2 (patch)
treeebea5c224cd7669925194ff9f5080f57b6b4ba50 /bin/xmlrpc-insert_payment
parentc3b8267c100ff48f67e625a5842be74a41ec5da4 (diff)
API methods to insert payments & credits (and look them up via phonenum), RT#27958
Diffstat (limited to 'bin/xmlrpc-insert_payment')
-rwxr-xr-xbin/xmlrpc-insert_payment26
1 files changed, 26 insertions, 0 deletions
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;