dw.order
Class PaymentCard
Represents payment cards and provides methods to access the payment card
attributes and status.
Note: this class handles sensitive financial and card holder data. Pay special attention to PCI DSS v3. requirements 1, 3, 7, and 9.
Properties
active
:
boolean
(Read Only)
Returns 'true' if payment card is active (enabled), otherwise 'false' is returned.
cardType
:
String
(Read Only)
The unique card type of the payment card.
description
:
MarkupText
(Read Only)
The description of the payment card.
image
:
MediaFile
(Read Only)
The reference to the payment card image.
name
:
String
(Read Only)
The name of the payment card.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getCardType()
:
String
Returns the unique card type of the payment card.
getDescription()
:
MarkupText
Returns the description of the payment card.
isActive()
:
boolean
Returns 'true' if payment card is active (enabled), otherwise 'false' is returned.
isApplicable(customer
:
Customer, countryCode
:
String, paymentAmount
:
Number)
:
boolean
Returns 'true' if this payment card 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.
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.
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.
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
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
Method Detail
getCardType
getCardType()
:
String
Returns the unique card type of the payment card.
Returns:
cardType of the payment card.
getDescription
getDescription()
:
MarkupText
Returns the description of the payment card.
Returns:
Description of the payment card.
getImage
getImage()
:
MediaFile
Returns the reference to the payment card image.
Returns:
Image of the payment card.
isActive
isActive()
:
boolean
Returns 'true' if payment card is active (enabled), otherwise 'false' is returned.
Returns:
true if payment card is active, otherwise false.
isApplicable
Returns 'true' if this payment card is applicable for the specified
customer, country and payment amount and the session currency.
The 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 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 session currency, and the session currency code is assigned to the method
Parameters:
customer
-
Customer or null
countryCode
-
Billing country code or null
paymentAmount
-
Payment amount or null
Returns:
true if payment card is applicable, false otherwise
verify
Verify the card against the provided values. This method is equivalent to
verify(Number, Number, String, String) but omits verification of the
card security code. If the verification fails the resulting
Status will hold up to 2 error items each with a code:
- PaymentStatusCodes.CREDITCARD_INVALID_EXPIRATION_DATE - the expiresMonth and expiresYear do not describe a month in the future, or describe an invalid month outside the range 1-12.
- PaymentStatusCodes.CREDITCARD_INVALID_CARD_NUMBER - the cardNumber does not verify against one or more configured checks, which may include the Luhn checksum, accepted number lengths, or accepted number prefixes.
Parameters:
expiresMonth
-
expiration month as integer, 1 (January) to 12 (December)
expiresYear
-
expiration year as integer, e.g. 2025
cardNumber
-
card number, a string containing digital characters
Returns:
status indicating result
verify
Verify the card against the provided values. If the verification fails the resulting
Status will hold up to 3 error items with these codes:
- PaymentStatusCodes.CREDITCARD_INVALID_EXPIRATION_DATE - the expiresMonth and expiresYear do not describe a month in the future, or describe an invalid month outside the range 1-12.
- PaymentStatusCodes.CREDITCARD_INVALID_CARD_NUMBER - the cardNumber does not verify against one or more configured checks, which may include the Luhn checksum, accepted number lengths, or accepted number prefixes.
- PaymentStatusCodes.CREDITCARD_INVALID_SECURITY_CODE - the card security code does not verify against the configured accepted length.
Parameters:
expiresMonth
-
expiration month as integer, 1 (January) to 12 (December)
expiresYear
-
expiration year as integer, e.g. 2025
cardNumber
-
card number, a string containing digital characters
csc
-
card security code, a string containing digital characters
Returns:
status indicating result