Page MenuHomeDatingVIP

cards.update
Updated 1,451 Days AgoPublic

cards.update

Description

Update record of stored credit card or replace it with different card

Input Parameters
NameTypeRequiredDescription
tracking_userintYesClient application user ID(s)
card_numberstringYesCredit card number
card_expirestringYesCredit card expiration date
card_cvv2stringYesCredit card CVV2 number
first_namestringYesUser first name
last_namestringYesUser last name
ccdt_idintYesCC card id
Returned

Array with these data in each array

NameTypeDescription
resultarraysuccess, ccdt_id, updated_orders included in result
Notes

Depending on exact Payment Processor and Merchant Account settings, this API call can be time-limited.
This means that some time period must pass between 2 successful calls.
If there are more calls with the same data within this period, this call could return failure.
Good approximation for this period is 5 minutes.

For Rocket Gate processor, this setting is available on Merchant Admin :
BlockDupPurchaseTimer - Minimum time between purchases using same card and amount.

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'	=> 'cards.update',
	'data'	=> array(
		'tracking_user' => '4151302',
		'ccdt_id'		=> '393',
		'card_number' => '5555555555554444',
		'card_expire' => '1215',
		'card_cvv2' => '123',
		'first_name' => 'Pera',
		'last_name' => 'Peric'
		)
);

$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=9)
  'code' => int 700
  'status' => string 'Action completed succesfully' (length=28)
  'command' => string 'cards.update' (length=12)
  'result' => array (size=3)
    'success' => boolean true,
   'ccdt_id' => int 123
   'updated_orders' array (length=1)
     int 123455
  'request' => 
    array (size=4)
      'token' => string 'some-token' (length=10)
      'password' => string 'some-pass' (length=32)
      'command' => string 'cards.update' (length=12)
      'data' => 
        array (size=7)
          'tracking_user' => string '4151302' (length=1)
          'ccdt_id' => string '393' (length=1)
          'card_number' => string '555555xxxxxx4444' (length=16)
          'card_expire' => string '1215' (length=4)
          'card_cvv2' => string 'xxx' (length=3)
          'first_name' => string 'Dragan' (length=6)
          'last_name' => string 'Dinic' (length=5)
  'ts' => int 1399652185
  'origin_ip' => boolean false
  'debug' => null
  'errors' => null
Last Author
aplawecki
Last Edited
May 5 2020, 10:19

Event Timeline

boris moved this document from Unknown Object (Phriction Wiki Document).Mar 11 2015, 13:25
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:22