Class OrderPaymentInstrument
dw.order
Class OrderPaymentInstrument
Represents any payment instrument used to pay orders, such as credit card or bank transfer. The object defines standard methods for credit card payment, and can be extended by attributes appropriate for other payment methods.
Properties
bankAccountDriversLicense  :  String  (Read Only)
The driver's license associated with a bank account if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current customer is identical to the customer related to the basket or order, and the current protocol is HTTPS.
  • If the method call happens in the context of the business manager and the current user has permission to the Orders module.
Otherwise, the method throws an exception.
bankAccountNumber  :  String  (Read Only)
The account number if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current customer is identical to the customer related to the basket or order, and the current protocol is HTTPS.
  • If the method call happens in the context of the business manager and the current user has permissions to the Orders module.
Otherwise, the method throws an exception.
capturedAmount  :  Money  (Read Only)
The sum of the captured amounts. The captured amounts are calculated on the fly. Associate a payment capture for an Payment Instrument with an Invoice using Invoice method addCaptureTransaction.
creditCardNumber  :  String  (Read Only)
The de-crypted creditcard number if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current authenticated customer is referenced by the basket or order, and the current protocol is HTTPS.
  • If the customer is anonymous, and the order references this customer, and the protocol is secure and the order status is CREATED.
  • If the method call happens in the context of the business manager and the current user has the permission to manage orders.
  • If the payment information has not been masked as a result of the data retention security policy for the site.
Otherwise, the method returns the masked credit card number.
paymentDetails  :  SalesforcePaymentDetails

Returns the payment details for this payment instrument, or null if none are available.

Payment details are differentiated by their type. Some payment types like SalesforcePaymentDetails.TYPE_CARD contain additional details like the card brand, or the last 4 digits of the card number. Details to those payments will be of a specific subclass like SalesforceCardPaymentDetails. Other payment types have no additional information so their details are represented by an object of the base type.

Payment details contain information about the method and credentials for a payment before any attempt to authorize or capture a payment amount. Some of that information may be relevant to the payer and is appropriate to present on an order confirmation or order history page, as well as in an order confirmation email. Other information may only be important for auditing or fraud check purposes and need not be presented to the payer.

paymentTransaction  :  PaymentTransaction  (Read Only)
The Payment Transaction for this Payment Instrument or null.
refundedAmount  :  Money  (Read Only)
The sum of the refunded amounts. The refunded amounts are calculated on the fly. Associate a payment refund for an Payment Instrument with an Invoice using Invoice method addRefundTransaction.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getBankAccountDriversLicense() : String
Returns the driver's license associated with a bank account if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current customer is identical to the customer related to the basket or order, and the current protocol is HTTPS.
getBankAccountNumber() : String
Returns the account number if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current customer is identical to the customer related to the basket or order, and the current protocol is HTTPS.
getCapturedAmount() : Money
Returns the sum of the captured amounts.
getCreditCardNumber() : String
Returns the de-crypted creditcard number if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current authenticated customer is referenced by the basket or order, and the current protocol is HTTPS.
getPaymentDetails() : SalesforcePaymentDetails

Returns the payment details for this payment instrument, or null if none are available.

getPaymentTransaction() : PaymentTransaction
Returns the Payment Transaction for this Payment Instrument or null.
getRefundedAmount() : Money
Returns the sum of the refunded amounts.
setPaymentDetails(details : SalesforcePaymentDetails) : void

Sets the payment details for this payment instrument.

Methods inherited from class ExtensibleObject
Methods inherited from class PersistentObject
Method Detail
getBankAccountDriversLicense
getBankAccountDriversLicense() : String
Returns the driver's license associated with a bank account if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current customer is identical to the customer related to the basket or order, and the current protocol is HTTPS.
  • If the method call happens in the context of the business manager and the current user has permission to the Orders module.
Otherwise, the method throws an exception.
Returns:
the driver's license number if the calling context meets the necessary criteria.

getBankAccountNumber
getBankAccountNumber() : String
Returns the account number if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current customer is identical to the customer related to the basket or order, and the current protocol is HTTPS.
  • If the method call happens in the context of the business manager and the current user has permissions to the Orders module.
Otherwise, the method throws an exception.
Returns:
the account number if the calling context meets the necessary criteria.

getCapturedAmount
getCapturedAmount() : Money
Returns the sum of the captured amounts. The captured amounts are calculated on the fly. Associate a payment capture for an Payment Instrument with an Invoice using Invoice method addCaptureTransaction.
Returns:
sum of captured amounts

getCreditCardNumber
getCreditCardNumber() : String
Returns the de-crypted creditcard number if the calling context meets the following criteria:
  • If the method call happens in the context of a storefront request and the current authenticated customer is referenced by the basket or order, and the current protocol is HTTPS.
  • If the customer is anonymous, and the order references this customer, and the protocol is secure and the order status is CREATED.
  • If the method call happens in the context of the business manager and the current user has the permission to manage orders.
  • If the payment information has not been masked as a result of the data retention security policy for the site.
Otherwise, the method returns the masked credit card number.
Returns:
the de-crypted creditcard number if the calling context meets the necessary criteria.

getPaymentDetails
getPaymentDetails() : SalesforcePaymentDetails

Returns the payment details for this payment instrument, or null if none are available.

Payment details are differentiated by their type. Some payment types like SalesforcePaymentDetails.TYPE_CARD contain additional details like the card brand, or the last 4 digits of the card number. Details to those payments will be of a specific subclass like SalesforceCardPaymentDetails. Other payment types have no additional information so their details are represented by an object of the base type.

Payment details contain information about the method and credentials for a payment before any attempt to authorize or capture a payment amount. Some of that information may be relevant to the payer and is appropriate to present on an order confirmation or order history page, as well as in an order confirmation email. Other information may only be important for auditing or fraud check purposes and need not be presented to the payer.

Returns:
the payment details, or null if none are available

getPaymentTransaction
getPaymentTransaction() : PaymentTransaction
Returns the Payment Transaction for this Payment Instrument or null.
Returns:
the Payment Transaction for this Payment Instrument or null.

getRefundedAmount
getRefundedAmount() : Money
Returns the sum of the refunded amounts. The refunded amounts are calculated on the fly. Associate a payment refund for an Payment Instrument with an Invoice using Invoice method addRefundTransaction.
Returns:
sum of refunded amounts

setPaymentDetails
setPaymentDetails(details : SalesforcePaymentDetails) : void

Sets the payment details for this payment instrument. Set null to clear them.

Payment details are differentiated by their type. The caller is responsible to set payment details of a type appropriate to the payment method and its credentials. Some payment types like SalesforcePaymentDetails.TYPE_CARD contain additional details like the card brand, or the last 4 digits of the card number. To set the details to those payments, use a specific subclass like SalesforceCardPaymentDetails. To set details for other payment types that have no additional information, use the base class SalesforcePaymentDetails.

Parameters:
details - payment details to set, or null to clear them