Class GiftCardTransactionDetails

Payment transaction details for gift card payments. Used for Salesforce Payments and third-party gift card providers. Capture and refund forensic fields only: not a copy of card CVC/AVS/3DS.

Each payment transaction holds at most one GiftCardTransactionDetails instance. These fields describe the outcome of the latest capture or refund for that instrument; a later refund replaces any prior capture values. approvalCode is for a successful outcome; reasonCode is for errors only.

Constant Summary 

ConstantDescription
REASON_CODE_DECLINED: String = “DECLINED”Provider-normalized reason code indicating a declined request.
REASON_CODE_INSUFFICIENT_FUNDS: String = “INSUFFICIENT_FUNDS”Provider-normalized reason code indicating insufficient funds.

Property Summary 

PropertyDescription
approvalCode: StringReturns the approval code from the latest successful capture or refund for this payment transaction, or null if not set.
processorResponseText: StringReturns the human-readable processor response text, or null if not set.
reasonCode: StringReturns the platform-normalized reason code for an error, or null if not set.

Constructor Summary 

ConstructorDescription
GiftCardTransactionDetails()Constructs an empty gift card transaction details object.

Method Summary 

MethodDescription
getApprovalCode()Returns the approval code from the latest successful capture or refund for this payment transaction, or null if not set.
getProcessorResponseText()Returns the human-readable processor response text, or null if not set.
getReasonCode()Returns the platform-normalized reason code for an error, or null if not set.
setApprovalCode(String)Sets the approval code for the latest successful capture or refund.
setProcessorResponseText(String)Sets the human-readable processor response text.
setReasonCode(String)Sets the platform-normalized reason code for an error.

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Constant Details 

REASON_CODE_DECLINED 

REASON_CODE_DECLINED: String = "DECLINED"

Provider-normalized reason code indicating a declined request.


REASON_CODE_INSUFFICIENT_FUNDS 

REASON_CODE_INSUFFICIENT_FUNDS: String = "INSUFFICIENT_FUNDS"

Provider-normalized reason code indicating insufficient funds.


Property Details 

approvalCode 

approvalCode: String

Returns the approval code from the latest successful capture or refund for this payment transaction, or null if not set. A refund that writes new details replaces any prior capture approval code.


processorResponseText 

processorResponseText: String

Returns the human-readable processor response text, or null if not set. The language and localization of this text are provider-defined and may vary by provider integration.


reasonCode 

reasonCode: String

Returns the platform-normalized reason code for an error, or null if not set. Leave unset on a successful capture or refund.

See Also:


Constructor Details 

GiftCardTransactionDetails() 

GiftCardTransactionDetails()

Constructs an empty gift card transaction details object.


Method Details 

getApprovalCode() 

getApprovalCode(): String

Returns the approval code from the latest successful capture or refund for this payment transaction, or null if not set. A refund that writes new details replaces any prior capture approval code.

Returns:

  • approval code

getProcessorResponseText() 

getProcessorResponseText(): String

Returns the human-readable processor response text, or null if not set. The language and localization of this text are provider-defined and may vary by provider integration.

Returns:

  • processor response text

getReasonCode() 

getReasonCode(): String

Returns the platform-normalized reason code for an error, or null if not set. Leave unset on a successful capture or refund.

Returns:

  • reason code

See Also:


setApprovalCode(String) 

setApprovalCode(approvalCode: String): void

Sets the approval code for the latest successful capture or refund. A refund that writes new details replaces any prior capture approval code.

Parameters:

  • approvalCode - approval code

setProcessorResponseText(String) 

setProcessorResponseText(processorResponseText: String): void

Sets the human-readable processor response text.

Parameters:

  • processorResponseText - processor response text

setReasonCode(String) 

setReasonCode(reasonCode: String): void

Sets the platform-normalized reason code for an error. Do not set this on a successful capture or refund.

Parameters:

  • reasonCode - reason code

See Also: