Token.update
Web Session Object
Transaction Object
Token Object
Season Set Object
Refund Object
RatePlan Object
Product Object
Payment Provider Object
Payment Method Object
NameValuePair Object
GiftCard Object
Entitlement Object
Chargeback Object
Campaign Object
BillingPlan Object
AutoBill Object
Address Object
Activity Object
Account Object
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; Vindicia Subscribe 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, Vindicia Subscribe 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 Vindicia Subscribe’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