transaction.list
transaction.list
transaction.list
Description
Return List of transactions
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
tran_id | mixed (int|array) | no | Show results for specified transaction ID(s) |
sub_id | mixed (int|array) | no | Show results for specified subscription ID(s) |
item_id | mixed (int|array) | no | Show results for specified item ID(s) |
page | (int) | no | Show only results on specified page |
limit | (int) | no | Restrict results per page |
on_date | (string) | no | Show results occured on specified date |
from_date | (string) | no | Show results from specified date |
to_date | (string) | no | Show results until specidied date |
from_id | (int) Show results with ID(s) | no | higher than specified |
to_id | (int) Show results with ID(s) | no | lower than specified |
nocache | (bool) | no | Choose whether results should be cached or not |
tracking_tag | mixed (int|array) | no | Show results with specified client side tracking tag(s) |
currency | mixed (string|array) | no | Show results with specified currency |
tracking_user | mixed (int|array) | no | Show results with specified client side user ID(s) |
order_id | mixed (int|array) | no | Show results with specified order ID(s) |
country | mixed (string|array) | no | Show results having specified countries |
ip | mixed (string|array) | no | Show only results having specified IP address(es) |
name | (string*) | no | Show only results having specified user name |
ccnum | (string*) | no | Show only results having specified credit card number part |
pp_type | mixed (string|array) | no | Show results having specified processor type(s) |
rebill_count | (int) | no | Show results having specified nubmer of rebill count(s) |
status | mixed (string|array) | no | Show results with specified order status |
(string*) | no | Show results having specified user email | |
hour | (int) | no | Show results having timestamp whithin specified hour |
by_hour | (bool) | no | Whether to group results by hour or not |
by_site | (bool) | no | Whether to group results by site ID or not |
refunded_tran_id | (bool) | no | Whether to group results by site ID or not |
Return
Name | Type | Description |
---|---|---|
tran_id | int | PV2 Transaction ID |
date | int | Transaction Date (unix timestamp) |
status | String | Status (successful|failed|init) |
description | String | Transaction Description |
amount | float | Transaction Amount |
transaction_type | String | Transaction Type ('S' for sale, 'A' for auth, 'R' for refund) |
origin | int | Origin (Direct or System) |
ppac_id | int | PV2 PP Account ID |
ccdt_id | int | PV2 Credit Card ID |
refunded_tran_id | int | Refunded transaction ID (if transaction is refund) |
currency | int | Transaction currency |
payment_code | int | Payment Code |
order_id | int | PV2 Order ID |
pp_id | int | PV2 PP ID |
tracking_tag | int | Tracking Tag |
hash | String | Hash generated during order |
user_id | int | PV2 user id |
refunded | int | Is transaction refunded |
refunded_amount | float | Refunded Amount |
type | string | Type (i.e. signup) |
processor | String | Payment Processor short name (NB, RG ...) |
processor_name | String | Payment Processor full name (NetBilling, Rocket Gate, ...) |
details | array | Transaction Details (different for each payment processor) |
status_message | string | Status message |
pay_status | string | Payment status (i.e. Approved by CS guys) |
status_severity | int | status_severity |
ccnum | string | Credit Card Number |
ccname | string | Credit Card Name |
ccxpdate | string | Credit Card Expired Date |
cctype | string | Credit Card Type (I.e. visa) |
ccaddress | string | Credit Card Address |
cczip | string | Credit Card ZIPCode |
ccstatus | string | Credit Card status |
cccountry | string | Credit Card Country |
items | array | items |
item_id | int | PV2 Item ID |
sub_id | string | PV2 Subscription ID |
tracking_user | string | Tracking User |
string | ||
card_type | string | card_type |
card_category | string | card_category |
bank_name | string | bank_name |
bank_country_code | string | bank_country_code |
bank_site | string | bank_site |
bank_phone | string | bank_phone |
Usage Example
<?php require_once "curl_http_client/curl_http_client.php"; $curl = new Curl_HTTP_Client(); //setup payment url and timeout $payment_url = 'https://payment.datingvip.dev'; $timeout = 30; //generate post data $post_data = array ( 'token' => 'some-token', 'password' => '130d04b80a4196857e47b254ebfbb53f', 'command' => 'transaction.list', 'data' => array('limit' => 1) ); $response = $curl->send_post_data($payment_url, $post_data, null, $timeout); if($response === false) { //handle errors } //decode json to get array $response = json_decode($response, true); var_dump($response);
Excepted output after running this script should be:
array (size=9) 'code' => int 700 'status' => string 'Action completed succesfully' (length=28) 'command' => string 'transaction.list' (length=16) 'result' => array (size=1) 0 => array (size=54) 'tran_id' => string '3' (length=1) 'date' => string '1399912839' (length=10) 'status' => string 'successful' (length=10) 'description' => string 'This is dinke testing manual rebill' (length=35) 'amount' => string '25.35' (length=5) 'transaction_type' => string 's' (length=1) 'origin' => string 'system' (length=6) 'ppac_id' => string '74' (length=2) 'ccdt_id' => string '3' (length=1) 'refunded_tran_id' => string '0' (length=1) 'currency' => string 'EUR' (length=3) 'payment_code' => string '700' (length=3) 'order_id' => string '3' (length=1) 'pp_id' => string '6' (length=1) 'tracking_tag' => string '14' (length=2) 'hash' => string '13995636282866c87677c50d9bd43782' (length=32) 'user_id' => string '2' (length=1) 'order_type' => string 'basic' (length=5) 'first_name' => string 'Dragan' (length=6) 'last_name' => string 'Dinic' (length=5) 'street' => string '' (length=0) 'city' => string '' (length=0) 'state' => string '' (length=0) 'zipcode' => string '34000' (length=5) 'country' => string 'NL' (length=2) 'refunded' => int 0 'refunded_amount' => int 0 'type' => string 'rebill' (length=6) 'processor' => string 'RG' (length=2) 'processor_name' => string 'RocketGate' (length=10) 'details' => array (size=14) 'transactionID' => string '1000145F14EBF41' (length=15) 'authNo' => string '042415' (length=6) 'invoiceID' => string 'M1_1_3' (length=6) 'merchantID' => string '2' (length=1) 'amount' => string '25.35' (length=5) 'currency' => string 'EUR' (length=3) 'description' => string '' (length=0) 'membershipID' => string 'M1_1' (length=4) 'avsCode' => string '' (length=0) 'cvv2Code' => string '' (length=0) 'reasonCode' => string '0' (length=1) 'responseCode' => string '0' (length=1) 'cardCountry' => string 'US' (length=2) 'responseMessage' => string 'Success: Success' (length=16) 'status_message' => string 'Action completed succesfully' (length=28) 'pay_status' => string 'APPROVED' (length=8) 'status_severity' => int 2 'ccnum' => string '555555xxxxxx4444' (length=16) 'ccname' => string 'Dragan Dinic' (length=12) 'ccxpdate' => string '2015-12-01' (length=10) 'cctype' => string 'mc' (length=2) 'ccaddress' => string '' (length=0) 'cczip' => string '34000' (length=5) 'ccstatus' => string 'active' (length=6) 'cccountry' => string 'NL' (length=2) 'items' => array (size=1) 0 => string '3' (length=1) 'item_id' => string '3' (length=1) 'sub_id' => string '1' (length=1) 'tracking_user' => string '1' (length=1) 'email' => string 'dragan@dinke.net' (length=16) 'card_brand' => string '' (length=0) 'card_type' => string '' (length=0) 'card_category' => string '' (length=0) 'bank_name' => string '' (length=0) 'bank_country_code' => string '' (length=0) 'bank_site' => string '' (length=0) 'bank_phone' => string '' (length=0) 'request' => array (size=4) 'token' => string 'some-token' (length=30) 'password' => string '130d04b80a4196857e47b254ebfbb53f' (length=32) 'command' => string 'transaction.list' (length=16) 'data' => array (size=1) 'limit' => string '1' (length=1) 'ts' => int 1399919518 'origin_ip' => boolean false 'debug' => null 'errors' => null
Referenced Files
None
Subscribers
None
- Last Author
- boris
- Last Edited
- Mar 11 2015, 13:33