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.

Property Summary 

PropertyDescription
bankAccountDriversLicense: String (read-only)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.
bankAccountNumber: String (read-only)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.
capturedAmount: Money (read-only)Returns the sum of the captured amounts.
creditCardNumber: String (read-only)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.
paymentTransaction: PaymentTransaction (read-only)Returns the Payment Transaction for this Payment Instrument or null.
refundedAmount: Money (read-only)Returns the sum of the refunded amounts.

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
getBankAccountDriversLicense()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()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()Returns the sum of the captured amounts.
getCreditCardNumber()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.
getPaymentTransaction()Returns the Payment Transaction for this Payment Instrument or null.
getRefundedAmount()Returns the sum of the refunded amounts.

Methods inherited from class PaymentInstrument 

getBankAccountDriversLicense, getBankAccountDriversLicenseLastDigits, getBankAccountDriversLicenseLastDigits, getBankAccountDriversLicenseStateCode, getBankAccountHolder, getBankAccountNumber, getBankAccountNumberLastDigits, getBankAccountNumberLastDigits, getBankRoutingNumber, getCreditCardExpirationMonth, getCreditCardExpirationYear, getCreditCardHolder, getCreditCardIssueNumber, getCreditCardNumber, getCreditCardNumberLastDigits, getCreditCardNumberLastDigits, getCreditCardToken, getCreditCardType, getCreditCardValidFromMonth, getCreditCardValidFromYear, getEncryptedBankAccountDriversLicense, getEncryptedBankAccountNumber, getEncryptedCreditCardNumber, getEncryptedCreditCardNumber, getGiftCertificateCode, getGiftCertificateID, getMaskedBankAccountDriversLicense, getMaskedBankAccountDriversLicense, getMaskedBankAccountNumber, getMaskedBankAccountNumber, getMaskedCreditCardNumber, getMaskedCreditCardNumber, getMaskedGiftCertificateCode, getMaskedGiftCertificateCode, getPaymentMethod, isCreditCardExpired, isPermanentlyMasked, setBankAccountDriversLicense, setBankAccountDriversLicenseStateCode, setBankAccountHolder, setBankAccountNumber, setBankRoutingNumber, setCreditCardExpirationMonth, setCreditCardExpirationYear, setCreditCardHolder, setCreditCardIssueNumber, setCreditCardNumber, setCreditCardToken, setCreditCardType, setCreditCardValidFromMonth, setCreditCardValidFromYear, setGiftCertificateCode, setGiftCertificateID

Methods inherited from class ExtensibleObject 

describe, getCustom

Methods inherited from class PersistentObject 

getCreationDate, getLastModified, getUUID

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

Property Details 

bankAccountDriversLicense 

bankAccountDriversLicense: String (read-only)

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.


bankAccountNumber 

bankAccountNumber: String (read-only)

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.


capturedAmount 

capturedAmount: Money (read-only)

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.


creditCardNumber 

creditCardNumber: String (read-only)

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.


paymentTransaction 

paymentTransaction: PaymentTransaction (read-only)

Returns the Payment Transaction for this Payment Instrument or null.


refundedAmount 

refundedAmount: Money (read-only)

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.


Method Details 

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.

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

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!