Skip to main content
Vindicia Knowledge Center

Token.update

Token.update

Token.update

The update method creates or updates a Token object.

To create a Token object, initialize the object, set the values for its data members, and then call the update method to store the changes in the Vindicia database. Do not set a value for VID; CashBox automatically generates a VID when you call update. When updating an existing Token object, identify it with either its VID or your token ID (merchantTokenId).

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

token: the Token object to create or update. To update an existing Token object, identify it with either its VID or your token ID (merchantTokenId). If you specify a new value for merchantTokenId, CashBox will create a new Token type.

Output

return: an object of type Return that indicates the success or failure of the call.

token: the updated or created Token object.

Returns

In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String

400

Unable to save token: error-description.

501

Error-description.

(Returned if the call cannot map the SOAP Token object to CashBox’s database representation of the token.)

Example

$soapCaller = new Token();

$tok = new Token();
$tok->setMerchantTokenId("ANY_TIME_PHONE_MINUTES");
$tok->setDescription("Any time phone minutes for 2010");

// Make the SOAP call to create the token

$response = $tok->update();
if($response['returnCode'] == 200) {

print "Created token type with id " .

$tok->merchantTokenId . " and vid ";

print $response['token']->VID . "\n";

}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top