dw.order
Class PaymentMethod
The PaymentMethod class represents a logical type of payment a customer can make in the storefront. This class provides methods to access the payment method attributes, status, and (for card-based payment methods) the related payment cards.

A typical storefront presents the customer a list of payment methods that a customer can choose from after he has entered his billing address during the checkout. PaymentMgr.getApplicablePaymentMethods(Customer, String, Number) is used to determine the PaymentMethods that are relevant for the customer based on the amount of his order, his customer groups, and his shipping address.

Properties
active  :  boolean  (Read Only)
Returns 'true' if payment method is active (enabled), otherwise 'false' is returned.
activePaymentCards  :  List  (Read Only)
Returns enabled payment cards that are assigned to this payment method, regardless of current customer, country or payment amount restrictions. The payment cards are sorted as defined in the Business Manager.
description  :  MarkupText  (Read Only)
The description of the payment method.
ID  :  String  (Read Only)
The unique ID of the payment method.
image  :  MediaFile  (Read Only)
The reference to the payment method image.
name  :  String  (Read Only)
The name of the payment method.
paymentProcessor  :  PaymentProcessor  (Read Only)
The payment processor associated to this payment method.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getActivePaymentCards() : List
Returns enabled payment cards that are assigned to this payment method, regardless of current customer, country or payment amount restrictions.
getApplicablePaymentCards(customer : Customer, countryCode : String, paymentAmount : Number) : List
Returns the sorted list of all enabled payment cards of this payment method applicable for the specified customer, country, payment amount and the session currency The payment cards are sorted as defined in the Business Manager.
getDescription() : MarkupText
Returns the description of the payment method.
getID() : String
Returns the unique ID of the payment method.
getImage() : MediaFile
Returns the reference to the payment method image.
getName() : String
Returns the name of the payment method.
getPaymentProcessor() : PaymentProcessor
Returns the payment processor associated to this payment method.
isActive() : boolean
Returns 'true' if payment method is active (enabled), otherwise 'false' is returned.
isApplicable(customer : Customer, countryCode : String, paymentAmount : Number) : boolean
Returns 'true' if this payment method is applicable for the specified customer, country and payment amount and the session currency.
Methods inherited from class ExtensibleObject
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.

Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβ€”passing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβ€”this is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?

This isn't just another prep courseβ€”it's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.

The Salesforce B2C Commerce Architect certification is a whole different gameβ€”complex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Methods inherited from class PersistentObject
Method Detail
getActivePaymentCards
getActivePaymentCards() : List
Returns enabled payment cards that are assigned to this payment method, regardless of current customer, country or payment amount restrictions. The payment cards are sorted as defined in the Business Manager.
Returns:
List of enabled payment cards of current site

getApplicablePaymentCards
getApplicablePaymentCards(customer : Customer, countryCode : String, paymentAmount : Number) : List
Returns the sorted list of all enabled payment cards of this payment method applicable for the specified customer, country, payment amount and the session currency The payment cards are sorted as defined in the Business Manager.

A payment card is applicable if

  • the card is restricted by customer group, and at least one of the groups of the specified customer is assigned to the card
  • the card is restricted by billing country, and the specified country code is assigned to the card
  • the card is restricted by payment amount for the session currency, and the specified payment amount is within the limits of the min/max payment amount defined for the method and the session currency
  • the card is restricted by currency code, and the specified currency code matches session currency.
All parameters are optional, and if not specified, the respective restriction won't be validated. For example, if a card is restricted by billing country, but no country code is specified, this card will be returned, unless it is filtered out by customer group or payment amount.
Parameters:
customer - Customer or null
countryCode - Billing country code or null
paymentAmount - Payment amount or null
Returns:
List of applicable payment cards of this payment method

getDescription
getDescription() : MarkupText
Returns the description of the payment method.
Returns:
Description of the payment method.

getID
getID() : String
Returns the unique ID of the payment method.
Returns:
ID of the payment method.

getImage
getImage() : MediaFile
Returns the reference to the payment method image.
Returns:
Image of the payment method.

getName
getName() : String
Returns the name of the payment method.
Returns:
Name of the payment method.

getPaymentProcessor
getPaymentProcessor() : PaymentProcessor
Returns the payment processor associated to this payment method.
Returns:
the payment processor associated to this payment method.

isActive
isActive() : boolean
Returns 'true' if payment method is active (enabled), otherwise 'false' is returned.
Returns:
true if payment method is active, otherwise false.

isApplicable
isApplicable(customer : Customer, countryCode : String, paymentAmount : Number) : boolean
Returns 'true' if this payment method is applicable for the specified customer, country and payment amount and the session currency.

The payment method is applicable if

  • the method is restricted by customer group, and at least one of the groups of the specified customer is assigned to the method
  • the method is restricted by billing country, and the specified country code is assigned to the method
  • the method is restricted by payment amount for the session currency, and the specified payment amount is within the limits of the min/max payment amount defined for the method and the session currency
  • the method is restricted by currency code, and the specified currency code matches session currency.
All parameters are optional, and if not specified, the respective restriction won't be validated. For example, if a method is restricted by billing country, but no country code is specified, this method will be returned, unless it is filtered out by customer group or payment amount.
Parameters:
customer - Customer or null
countryCode - Billing country code or null
paymentAmount - Payment amount or null
Returns:
true if payment method is applicable, false otherwise

β™₯
Notifications pending to read