diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/freeside-init | 60 | ||||
| -rwxr-xr-x | bin/test_scrub_sql | 4 | ||||
| -rwxr-xr-x | bin/xmlrpc-customer_info | 21 | ||||
| -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 | ||||
| -rwxr-xr-x | bin/xmlrpc-location_info | 21 | ||||
| -rwxr-xr-x | bin/xmlrpc-new_customer | 63 | ||||
| -rwxr-xr-x | bin/xmlrpcd-phonenum_balance.pl | 2 |
10 files changed, 211 insertions, 63 deletions
diff --git a/bin/freeside-init b/bin/freeside-init deleted file mode 100755 index fe12931fc..000000000 --- a/bin/freeside-init +++ /dev/null @@ -1,60 +0,0 @@ -#! /bin/sh -# -# start the freeside job queue daemon - -#PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/local/bin/freeside-queued -NAME=freeside-queued -DESC="freeside job queue daemon" -USER="ivan" - -test -f $DAEMON || exit 0 - -set -e - -case "$1" in - start) - echo -n "Starting $DESC: " -# start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid -b -m\ -# --exec $DAEMON - $DAEMON $USER & - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON - echo "$NAME." - rm /var/run/$NAME.pid - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; - restart|force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart". - # - $0 stop - sleep 1 - $0 start - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/bin/test_scrub_sql b/bin/test_scrub_sql index fb26fe940..fe66805d3 100755 --- a/bin/test_scrub_sql +++ b/bin/test_scrub_sql @@ -15,11 +15,11 @@ foreach my $table (qw( part_export_option - payment_gateway payment_gateway_option + payment_gateway agent_payment_gateway - queue queue_arg + queue cust_pay_batch )) { print "DELETE FROM $table;\n"; diff --git a/bin/xmlrpc-customer_info b/bin/xmlrpc-customer_info new file mode 100755 index 000000000..8086a8dc4 --- /dev/null +++ b/bin/xmlrpc-customer_info @@ -0,0 +1,21 @@ +#!/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.customer_info', + 'secret' => 'sharingiscaring', + 'custnum' => 181318, +); + +#die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +1; 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; diff --git a/bin/xmlrpc-location_info b/bin/xmlrpc-location_info new file mode 100755 index 000000000..b2595ddc3 --- /dev/null +++ b/bin/xmlrpc-location_info @@ -0,0 +1,21 @@ +#!/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.location_info', + 'secret' => 'sharingiscaring', + 'custnum' => 181318, +); + +#die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +1; diff --git a/bin/xmlrpc-new_customer b/bin/xmlrpc-new_customer new file mode 100755 index 000000000..aea8053ce --- /dev/null +++ b/bin/xmlrpc-new_customer @@ -0,0 +1,63 @@ +#!/usr/bin/perl + +use strict; +use Frontier::Client; +use Data::Dumper; + +my( $username, $password ) = ( @ARGV ); + +my $uri = new URI 'http://localhost:8008/'; + +my $server = new Frontier::Client ( 'url' => $uri ); + +my $result = $server->call('FS.API.new_customer', + #API shared secret + 'secret' => 'sharingiscaring', + + #customer informaiton + 'agentnum' => 1, + 'refnum' => 1, #advertising source + 'agent_custid' => '', #'323', + 'referral_custnum' => 1, + + 'first' => 'Tofu', + 'last' => 'Beast', + 'company' => 'Bank of Soymerica', + + #address + 'address1' => '1234 Soybean Ln.', + 'city' => 'Tofutown', + 'county' => '', + 'state' => 'CA', + 'zip' => '54321', + 'country' => 'US', + 'latitude' => '', + 'longitude' => '', + 'geocode' => '', + 'censustract' => '', + 'censusyear' => '', + + #phones + 'daytime' => '555 444 3211', + 'night' => '', + 'fax' => '', + 'mobile' => '123 466 3332', + + #invoicing info + 'invoicing_list' => 'tofu@example.com', #comma-separated email addresses + 'postal_invoicing' => 1, + + #billing information + 'payby' => 'CARD', # DCRD, CHEK, DCHK, BILL, etc. + 'payinfo' => '4111111111111111',#card number / acctno@routing / PO# + 'paydate' => '11/2019', #card expiration + 'paycvv' => '123', #card CVV/security code + 'payname' => 'Thomas Beast', #"Exact name on card" if different +); + +die $result->{'error'} if $result->{'error'}; + +my $custnum = $result->{'custnum'}; +warn "added new customer w/custnum $custnum\n"; + +1; diff --git a/bin/xmlrpcd-phonenum_balance.pl b/bin/xmlrpcd-phonenum_balance.pl index 8aeeb11c2..7a3e0a7a9 100755 --- a/bin/xmlrpcd-phonenum_balance.pl +++ b/bin/xmlrpcd-phonenum_balance.pl @@ -8,7 +8,7 @@ my $uri = new URI 'http://localhost:8080/'; my $server = new Frontier::Client ( 'url' => $uri ); -my $result = $server->call('phonenum_balance', 'phonenum' => '9567566022', ); +my $result = $server->call('FS.ClientAPI_XMLRPC.phonenum_balance', 'phonenum' => '9567566022', ); #die $result->{'error'} if $result->{'error'}; |
