transaction.get.xsale
transaction.get.xsale
transaction.get.xsale
Description
Return XSALE transaction with details included (same as for transaction.list) - so from different partner
Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | int | yes | Show result for specified transaction ID |
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) |
| 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 |
| tracking_item | int | External 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 $curl = new \Dinke\CurlHttpClient; //setup payment url and timeout $payment_url = 'https://dev-payment.datingvip.com/api.json'; $timeout = 30; $curl->setCredentials('some-token', 'some-pass'); $post_data = array( 'cmd' => 'transaction.get.xsale', 'data' => array('id' => 1983) ); $response = $curl->sendPostData($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=1)
'result' =>
array (size=8)
'code' => int 700
'status' => string 'Action completed succesfully' (length=28)
'command' => string 'transaction.get.xsale' (length=16)
'result' =>
array (size=61)
'tran_id' => string '1983' (length=4)
'ptnr_id' => string '55' (length=2)
'ppac_id' => string '109' (length=3)
'order_id' => string '548' (length=3)
'ccdt_id' => string '396' (length=3)
'transaction_type' => string 's' (length=1)
'amount' => string '0.02' (length=4)
'currency' => string 'USD' (length=3)
'description' => string 'order #548 - uid #438 - RG Stepdown TEST product||13477' (length=55)
'status' => string 'failed' (length=6)
'refunded_tran_id' => string '0' (length=1)
'origin' => string 'direct' (length=6)
'ts' => string '1429203868' (length=10)
'original_ts' => string '0' (length=1)
'status_code' => string '1' (length=1)
'payment_code' => string '608' (length=3)
'pp_id' => string '6' (length=1)
'tracking_tag' => string '542' (length=3)
'hash' => string '142920386839553dccf767263e6150b2' (length=32)
'user_id' => string '438' (length=3)
'order_type' => string 'basic' (length=5)
'first_name' => string 'Test' (length=4)
'last_name' => string 'Test' (length=4)
'street' => string '' (length=0)
'city' => string '' (length=0)
'state' => string '' (length=0)
'zipcode' => string '75001' (length=5)
'country' => string 'FR' (length=2)
'site_id' => string '542' (length=3)
'refunded' => int 0
'refunded_amount' => int 0
'type' => string 'signup' (length=6)
'name' => string 'Rocket Gate - DatingBackend' (length=27)
'is_active' => string '1' (length=1)
'ccnum' => string '413415xxxxxx4135' (length=16)
'ccname' => string 'Test Test' (length=9)
'ccxpdate' => string '2017-01-01' (length=10)
'cctype' => string 'visa' (length=4)
'ccaddress' => string '' (length=0)
'cczip' => string '75001' (length=5)
'ccstatus' => string 'inactive' (length=8)
'cccountry' => string 'FR' (length=2)
'processor' => string 'RG' (length=2)
'processor_name' => string 'RocketGate' (length=10)
'date' => string '1429203868' (length=10)
'details' =>
array (size=40)
'tdrg_id' => string '1876' (length=4)
'guidNo' => string '100014CC3305CF5' (length=15)
'authNo' => string '' (length=0)
'merchantInvoiceID' => string 'DBT_30551147_548' (length=16)
'merchantAccount' => string '1' (length=1)
'approvedAmount' => string '0.02' (length=4)
'approvedCurrency' => string 'USD' (length=3)
'scrubResults' => string 'NEGDB=0,PROFILE=1,ACTIVITY=0' (length=28)
'merchantCustomerID' => string 'DBT_30551147' (length=12)
'avsResponse' => string '' (length=0)
'cvv2Code' => string '' (length=0)
'reasonCode' => string '105' (length=3)
'responseCode' => string '1' (length=1)
'cardCountry' => string 'US' (length=2)
'cardHash' => string '+2YSOHMjpgwbHlNHudLjgPFxFy/MWlBeu2Kxw953E3Y=' (length=44)
'merchantID' => string '1376948206' (length=10)
'bankResponseCode' => string '105' (length=3)
'ptnr_id' => string '55' (length=2)
'ppac_id' => string '109' (length=3)
'order_id' => string '548' (length=3)
'ccdt_id' => string '396' (length=3)
'transaction_type' => string 's' (length=1)
'amount' => string '0.02' (length=4)
'currency' => string 'USD' (length=3)
'description' => string 'NEGDB=0,PROFILE=1,ACTIVITY=0' (length=28)
'status' => string 'failed' (length=6)
'refunded_tran_id' => string '0' (length=1)
'origin' => string 'direct' (length=6)
'ts' => string '1429203868' (length=10)
'original_ts' => string '0' (length=1)
'status_code' => string '1' (length=1)
'payment_code' => string '608' (length=3)
'transactionID' => string '100014CC3305CF5' (length=15)
'invoiceID' => string 'DBT_30551147_548' (length=16)
'membershipID' => string 'DBT_30551147' (length=12)
'avsCode' => string '' (length=0)
'errorMessage' => string 'Declined Over Limit' (length=19)
'responseMessage' => string 'Declined Over Limit: The bank has declined the transaction because the account is over limit.' (length=93)
'uniqueAccountId' => string '1376948206-1' (length=12)
'is_retrieval' => string '0' (length=1)
'status_message' => string 'Transaction declined due to insufficient funds. Please try another card.' (length=72)
'pay_status' => string 'DECLINED' (length=8)
'items' =>
array (size=1)
0 => string '20547' (length=5)
'item_id' => string '20547' (length=5)
'tracking_item' => string '201' (length=3)
'sub_id' => string '' (length=0)
'tracking_user' => string '30551147' (length=8)
'email' => string 'webdriver+3221@gmail.com' (length=24)
'card_brand' => string 'VISA' (length=4)
'card_type' => string 'CREDIT' (length=6)
'card_category' => string '' (length=0)
'bank_name' => string 'BANK OF NEW HAMPSHIRE, N.A.' (length=27)
'bank_country_code' => string 'US' (length=2)
'bank_site' => string 'HTTP://WWW.BANKNH.COM/' (length=22)
'bank_phone' => string '603.527.6608 OR 603.527.6769' (length=28)
'request' =>
array (size=4)
'cmd' => string 'transaction.get.xsale' (length=16)
'data' =>
array (size=1)
'id' => string '1983' (length=4)
'token' => string 'some-token' (length=26)
'pass' => string 'some-pass' (length=32)
'ts' => int 1429563631
'origin_ip' => string '93.87.220.184' (length=13)
'errors' => nullReferenced Files
None
Subscribers
None
- Last Author
- aplawecki
- Last Edited
- Mar 15 2021, 09:12