Page MenuHomeDatingVIP

transaction.get.xsale
Updated 1,138 Days AgoPublic

transaction.get.xsale

Description

Return XSALE transaction with details included (same as for transaction.list) - so from different partner

Input Parameters
NameTypeRequiredDescription
idintyesShow result for specified transaction ID

Return

NameTypeDescription
tran_idintPV2 Transaction ID
dateintTransaction Date (unix timestamp)
statusStringStatus (successful|failed|init)
descriptionStringTransaction Description
amountfloatTransaction Amount
transaction_typeStringTransaction Type ('S' for sale, 'A' for auth, 'R' for refund)
originintOrigin (Direct or System)
ppac_idintPV2 PP Account ID
ccdt_idintPV2 Credit Card ID
refunded_tran_idintRefunded transaction ID (if transaction is refund)
currencyintTransaction currency
payment_codeintPayment Code
order_idintPV2 Order ID
pp_idintPV2 PP ID
tracking_tagintTracking Tag
hashStringHash generated during order
user_idintPV2 user id
refundedintIs transaction refunded
refunded_amountfloatRefunded Amount
typestringType (i.e. signup)
processorStringPayment Processor short name (NB, RG ...)
processor_nameStringPayment Processor full name (NetBilling, Rocket Gate, ...)
detailsarrayTransaction Details (different for each payment processor)
status_messagestringStatus message
pay_statusstringPayment status (i.e. Approved by CS guys)
ccnumstringCredit Card Number
ccnamestringCredit Card Name
ccxpdatestringCredit Card Expired Date
cctypestringCredit Card Type (I.e. visa)
ccaddressstringCredit Card Address
cczipstringCredit Card ZIPCode
ccstatusstringCredit Card status
cccountrystringCredit Card Country
itemsarrayitems
item_idintPV2 Item ID
tracking_itemintExternal Item ID
sub_idstringPV2 Subscription ID
tracking_userstringTracking User
emailstringe-mail
card_typestringcard_type
card_categorystringcard_category
bank_namestringbank_name
bank_country_codestringbank_country_code
bank_sitestringbank_site
bank_phonestringbank_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' => null
Last Author
aplawecki
Last Edited
Mar 15 2021, 09:12