Page MenuHomeDatingVIP

api.client.log
Updated 3,286 Days AgoPublic

api.client.log

Description

Retrieve records from API client log datatable

Input Parameters
NameTypeRequiredDescription
tran_idintNoTransaction ID
pageintNo (default 1)Show only results on specified page
limitintNo (default 100)Restrict results per page
Return
NameTypeDescription
resultarrayArray with transaction data
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');

//generate post data
$post_data = array
(
	'token'		=> 'some-token',
	'password'	=> 'some-pass',
	'cmd'	=> 'api.client.log',
	'data'	=> array('tran_id' => 1,
			'page' => 0,
			'limit' => 1)
);

$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 'api.client.log' (length=14)
      'result' => 
        array (size=1)
          0 => 
            array (size=5)
              'ts' => string '0' (length=1)
              'ip' => string '' (length=0)
              'tran_id' => string '7' (length=1)
              'request' => string '{"version":"P2.6","merchantID":"1376948206","merchantPassword":"somepass","merchantInvoiceID":"DBT_13850143_5","merchantCustomerID":"DBT_13850143","currency":"USD","amount":7.95,"ipAddress":"188.255.147.196","cardNo":"413415xxxxxx4135","expireMonth":"08","expireYear":"2016","cvv2":"xxx","customerFirstName":"Dejan","customerLastName":"Trajkovic","email":"dtrajko+11115C@gmail.com","billingAddress":"","billingCity":"","billingState":"","billingZipCode":"33330","billingCountry":"US","scrub":"IGNORE","cvv2Check":"YES","avsCheck":"IGNORE","billingType":"I","transactionType":"CC_CONFIRM","referenceGUID":"1000148C2FC18D7"}' (length=630)
              'response' => string '{"authNo":"189030","merchantInvoiceID":"DBT_13850143_5","merchantAccount":"1","approvedAmount":"7.95","cardLastFour":"4135","version":"1.0","avsResponse":"Y","merchantCustomerID":"DBT_13850143","scrubResults":"NEGDB=0,PROFILE=1,ACTIVITY=0","cvv2Code":"M","reasonCode":"0","retrievalNo":"1000148c2fc18d7","cardIssuerName":"BANK OF NEW HAMPSHIRE NATIONAL ASSOCIATION","payType":"CREDIT","cardHash":"+2YSOHMjpgwbHlNHudLjgPFxFy\/MWlBeu2Kxw953E3Y=","cardDebitCredit":"1","cardDescription":"CREDIT","cardCountry":"US","cardType":"VISA","bankResponseCode":"0","approvedCurrency":"USD","guidNo":"1000148C2FC18D7","cardExpiration":"0816","responseCode":"0","error_msg":""}' (length=663)
      'request' => 
        array (size=4)
          'cmd' => string 'api.client.log' (length=14)
          'data' => 
            array (size=3)
              'tran_id' => string '7' (length=1)
              'page' => string '0' (length=1)
              'limit' => string '1' (length=1)
          'token' => string 'some-token' (length=26)
          'pass' => string 'some-pass' (length=32)
      'ts' => int 1429543395
      'origin_ip' => string '93.87.220.184' (length=13)
      'errors' => null
Last Author
dinke
Last Edited
Apr 20 2015, 11:30

Event Timeline

boris moved this document from Unknown Object (Phriction Wiki Document).Mar 11 2015, 13:22
boris changed the visibility from "Public (No Login Required)" to "All Users".
boris changed the visibility from "All Users" to "Public (No Login Required)".
boris shifted this object from the Restricted Space space to the S6 Everyone space.Aug 8 2018, 08:21