AlternativePaymentMethodResponse Class

The class contains the response details of the alternative payment method.

Namespace

CommercePayments

Example

1commercepayments.AlternativePaymentMethodResponse response = new commercepayments.AlternativePaymentMethodResponse();
2response.setEmail('alternativePaymentMethod');
3response.setEmail('foo@foo.com');
4response.setGatewayToken('NMoPoIOnTZSaRaWcV7gUUXe');
5response.setGatewayTokenDetails('gateway token details');

AlternativePaymentMethodResponse Methods

The following are methods for AlternativePaymentMethodResponse.

setAccountId(accountId)

Sets the ID of the Salesforce payments account to which the payment method is linked.

Signature

public void setAccountId(Id accountId)

Parameters

  • accountId:

    Type: Id

    Salesforce payments account ID.

Return Value

Type: void

setComments(comments)

Sets the notes about the payment method added by users.

Signature

public void setComments(String comments)

Parameters

  • comments:

    Type: String

    Notes about

    the payment method added by users, maximum 1000 characters.

Return Value

Type: void

setEmail(email)

Sets the email ID of the card holder.

Signature

public void setEmail(String email)

Parameters

  • email:

    Type: String

    Email

    ID of the card holder.

Return Value

Type: void

setGatewayToken(gatewayToken)

Sets the token ID that a payment gateway generates when it first processes a payment.

Signature

public void setGatewayToken(String gatewayToken)

Parameters

  • gatewayToken:

    Type: String

    A unique, alphanumeric ID, called a token, that a payment gateway generates when it first processes a payment. The token replaces the actual payment data so that the data is kept secure. This token is stored as encrypted text, and can be used for recurring payments.

Return Value

Type: void

setGatewayTokenDetails(gatewayTokenDetails)

Sets the details about the payment gateway token.

Signature

public void setGatewayTokenDetails(String gatewayTokenDetails)

Parameters

  • gatewayTokenDetails:

    Type: String

    Detailed information about

    the gateway token.

Return Value

Type: void

setName(name)

Sets the name that is assigned to the PaymentMethod object.

Signature

public void setName(String name)

Parameters

  • name:

    Type: String

    Name that you assign to the payment method object.

Return Value

Type: void