Customer Financials
Endpoint: https://www.dumpster.software/controller.html.
Provides a list of transactions, a single transaction based on a valid id, and
allows for payments. Here you will submit the following arguments and the system
will respond with a JSON that includes:
Retrieve transactions (list):
The transaction list will provide a list of job transactions, however, it will do so 50
records at a time. The offset argument will allow developers to control the starting
point in which the database will start generating records.
Arguments |
Req |
Data Type |
Example |
command |
Y |
N/A |
cmdBoxTPortalTransactionsList |
username_api |
Y |
N/A |
Same as the handshake |
session_key_api |
Y |
N/A |
Provided by handshake |
username_customer |
Y |
N/A |
To be issued |
session_key_customer |
Y |
N/A |
Provided by customer handshake |
customer_id |
Y |
int(11) |
Provided by customer handshake |
offset |
Y |
int(11) |
0 |
Box Tracker Response:: A JSON with the following fields:
Field |
Example |
Explanation |
status |
200 |
See the status code section |
errorString |
ERROR: Invalid Session Key |
What if anything went wrong |
transactionsObjList |
--- |
An object that contains all customer transactions available to the portal
|
Sample Code ( Perl ):
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use Data::Dumper;
use JSON;
use URI::Encode qw(uri_decode uri_encode);
my $destination;
my %fields = (
command => "cmdBoxTPortalTransactionsList",
username_api => "username_api",
session_key_api => "session_key_api",
username_customer => "username_customer",
session_key_customer => "session_key_customer",
customer_id => "customer_id",
offset => "offset"
);
my @args = ();
foreach my $key (keys %fields) {
my $value = uri_encode($fields{$key});
push @args, "$key=$value";
}
my $queryString = join('&', @args);
$destination = "https://www.dumpster.software/controller.html?$queryString";
my $ua = LWP::UserAgent->new;
my $response = $ua->request(HTTP::Request->new(GET => $destination));
my $json = JSON->new();
my $obj = $json->decode($response->content);
print Data::Dumper->Dump([$obj]);
Retrieve transaction (single):
Arguments |
Req |
Data Type |
Example |
command |
Y |
N/A |
cmdBoxTPortalTransactionData |
username_api |
Y |
N/A |
Same as the handshake |
session_key_api |
Y |
N/A |
Provided by handshake |
username_customer |
Y |
N/A |
To be issued |
session_key_customer |
Y |
N/A |
Provided by customer handshake |
customer_id |
Y |
int(11) |
54321 |
transaction_id |
Y |
int(11) |
12345 |
Box Tracker Response:: A JSON with the following fields:
Field |
Example |
Explanation |
status |
200 |
See the status code section |
errorString |
ERROR: Invalid Session Key |
What if anything went wrong |
transactionObj |
--- |
An object that contains all information belonging to the target transaction
|
Sample Code ( Perl ):
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use Data::Dumper;
use JSON;
use URI::Encode qw(uri_decode uri_encode);
my $destination;
my %fields = (
command => "cmdBoxTPortalTransactionData",
username_api => "username_api",
session_key_api => "session_key_api",
username_customer => "username_customer",
session_key_customer => "session_key_customer",
customer_id => "customer_id",
transaction_id => "transaction_id"
);
my @args = ();
foreach my $key (keys %fields) {
my $value = uri_encode($fields{$key});
push @args, "$key=$value";
}
my $queryString = join('&', @args);
$destination = "https://www.dumpster.software/controller.html?$queryString";
my $ua = LWP::UserAgent->new;
my $response = $ua->request(HTTP::Request->new(GET => $destination));
my $json = JSON->new();
my $obj = $json->decode($response->content);
print Data::Dumper->Dump([$obj]);
Direct/One time payment
Arguments |
Req |
Data Type |
Example |
command |
Y |
N/A |
cmdBoxTPortalProcessPayment |
username_api |
Y |
N/A |
Same as the handshake |
session_key_api |
Y |
N/A |
Provided by handshake |
username_customer |
Y |
N/A |
To be issued |
session_key_customer |
Y |
N/A |
Provided by customer handshake |
customer_id |
Y |
int(11) |
Provided by customer handshake |
ccard_id |
Y |
int(11) |
12345 |
transaction_id |
Y |
int(11) |
12345 |
The arguments below must be included if the ccard_id happens to be 0
|
ccard_first_name |
Y (if) |
varchar(150) |
John or ABC |
ccard_last_name |
Y (if) |
varchar(150) |
Smith or Company |
ccard_address |
Y (if) |
varchar(100) |
123 Main Street |
ccard_address2 |
Y (if) |
varchar(100) |
123 Main Street |
ccard_email |
Y (if) |
varchar(255) |
johnsmith@somedomain.com |
ccard_city |
Y (if) |
varchar(100) |
Yourtown |
ccard_state |
Y (if) |
varchar(2) |
VA or AB |
ccard_zip |
Y (if) |
varchar(10 |
12345 or H7J1Y6 |
ccard_country |
Y (if) |
varchar(50) |
YourCounty |
ccard_phone |
Y (if) |
varchar(50) |
1234567890 |
ccard_number |
Y |
varchar(20) |
4111111111111111 |
ccard_exp_month |
Y |
varchar(2) |
04 |
ccard_exp_year |
Y |
varchar(2) |
22 |
ccard_cvv |
Y |
varchar(5) |
123 |
ccard_store |
N |
int(1) |
0 or 1 |
ccard_make_primary |
N |
int(1) |
0 or 1 |
Box Tracker Response:: A JSON with the following fields:
Sample Code ( Perl ):
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use Data::Dumper;
use JSON;
use URI::Encode qw(uri_decode uri_encode);
my $destination;
my %fields = (
command => "cmdBoxTPortalProcessPayment",
ccard_id => "ccard_id",
transaction_id => "transaction_id",
username_api => "username_api",
session_key_api => "session_key_api",
username_customer => "username_customer",
session_key_customer => "session_key_customer",
customer_id => "customer_id"
);
if($fields{ccard_id} == 0) {
$fields{ccard_address} = "ccard_address";
$fields{ccard_address2} = "ccard_address2";
$fields{ccard_city} = "ccard_city";
$fields{ccard_country} = "ccard_country";
$fields{ccard_cvv} = "ccard_cvv";
$fields{ccard_email} = "ccard_email";
$fields{ccard_exp_month} = "ccard_exp_month";
$fields{ccard_exp_year} = "ccard_exp_year";
$fields{ccard_first_name} = "ccard_first_name";
$fields{ccard_last_name} = "ccard_last_name";
$fields{ccard_number} = "ccard_number";
$fields{ccard_phone} = "ccard_phone";
$fields{ccard_state} = "ccard_state";
$fields{ccard_zip} = "ccard_zip";
$fields{ccard_store} = "ccard_store";
$fields{ccard_make_primary} = "ccard_make_primary";
}
my @args = ();
foreach my $key (keys %fields) {
my $value = uri_encode($fields{$key});
push @args, "$key=$value";
}
my $queryString = join('&', @args);
$destination = "https://www.dumpster.software/controller.html?$queryString";
my $ua = LWP::UserAgent->new;
my $response = $ua->request(HTTP::Request->new(GET => $destination));
my $json = JSON->new();
my $obj = $json->decode($response->content);
print Data::Dumper->Dump([$obj]);