API methods to insert payments & credits (and look them up via phonenum), RT#27958
[freeside.git] / bin / xmlrpc-insert_payment_phonenum
diff --git a/bin/xmlrpc-insert_payment_phonenum b/bin/xmlrpc-insert_payment_phonenum
new file mode 100755 (executable)
index 0000000..21f01f0
--- /dev/null
@@ -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;