Newer Version Available

This content describes an older version of this product. View Latest

PaymentMethodTokenizationResponse Class

Gateway response sent by payment gateway adapters for the payment method tokenization request. The response includes the payment method’s token ID value.

Namespace

CommercePayments

Usage

The constructor of this class takes no arguments. For example:

CommercePayments.PaymentMethodTokenizationResponse pmtr = new CommercePayments.PaymentMethodTokenizationResponse();

This class contains details about a tokenize transaction gateway response. Fields of this class object are populated from the response obtained from the payment gateway. This class is mapped to a response class in the Java layer, which the payments platform uses to construct the Tokenize gateway response shown to the user.

1commercepayments.PaymentMethodTokenizationResponse tokenizeResponse = new commercepayments.PaymentMethodTokenizationResponse();

Example

1commercepayments.PaymentMethodTokenizationResponse tokenizeResponse = new commercepayments.PaymentMethodTokenizationResponse();

PaymentMethodTokenizationResponse Methods

The following are methods for PaymentMethodTokenizationResponse.

setGatewayAvsCode(gatewayAvsCode)

Sets the AVS (address verification system) result code information that the gateway returned. Maximum length of 64 characters.

Signature

global void setGatewayAvsCode(String gatewayAvsCode)

Parameters

gatewayAvsCode
Type: String
Used to verify the address mapped to a payment method when the payments platform requests tokenization from the payment gateway.

Return Value

Type: void

setGatewayDate(gatewayDate)

Sets the date that the tokenization occurred. Some gateways don’t send this value.

Signature

global void setGatewayDate(Datetime gatewayDate)

Parameters

gatewayDate
Type: Datetime

Return Value

Type: void

setGatewayMessage(gatewayMessage)

Sets error messages that the gateway returned for the tokenization request. Maximum length of 255 characters.

Signature

global void setGatewayMessage(String gatewayMessage)

Parameters

gatewayMessage
Type: String

Return Value

Type: void

setGatewayResultCode(gatewayResultCode)

Sets a gateway-specific result code. The code may be mapped to a Salesforce-specific result code. Maximum length of 64 characters.

Signature

global void setGatewayResultCode(String gatewayResultCode)

Parameters

gatewayResultCode
Type: String
Gateway-specific result code. Must be used to map a Salesforce-specific result code.

Return Value

Type: void

setGatewayResultCodeDescription(gatewayResultCodeDescription)

Sets a description of the gateway-specific result code that a payment gateway returned. Maximum length of 1000 characters.

Signature

global void setGatewayResultCodeDescription(String gatewayResultCodeDescription)

Parameters

gatewayResultCodeDescription
Type: String
Provides additional information about the result code and why the gateway returned the specific code. Descriptions will vary between different gateways.

Return Value

Type: void

setGatewayToken(gatewayToken)

Sets the gateway token value that the gateway returned.

Signature

global void setGatewayToken(String gatewayToken)

Parameters

gatewayToken
Type: String

Return Value

Type: void

setGatewayTokenDetails(gatewayTokenDetails)

Sets any additional information that the gateway returned about the payment token.

Signature

global void setGatewayTokenDetails(String gatewayTokenDetails)

Parameters

gatewayTokenDetails
Type: String

Return Value

Type: void

setSalesforceResultCodeInfo(salesforceResultCodeInfo)

Sets the Salesforce-specific result code information. Payment gateways have many response codes for payment calls. Salesforce uses the result code information to map payment gateway codes to a predefined set of standard Salesforce result codes.

Signature

global void setSalesforceResultCodeInfo(commercepayments.SalesforceResultCodeInfo salesforceResultCodeInfo)

Parameters

salesforceResultCodeInfo
Type: SalesforceResultCodeInfo
Description of the Salesforce result code value.

Return Value

Type: void