dw.extensions.payments
Class SalesforcePaymentsMgr
Object
dw.extensions.payments.SalesforcePaymentsMgr
Contains functionality for use with Salesforce Payments.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
static attachPaymentMethod(paymentMethod : SalesforcePaymentMethod, customer : Customer) : void
Attaches the given payment method to the given customer.
static detachPaymentMethod(paymentMethod : SalesforcePaymentMethod) : void
Detaches the given payment method from its associated customer.
static getAttachedPaymentMethods(customer : Customer) : Collection
Returns a collection containing the payment methods attached to the given customer.
static getPaymentIntent(basket : Basket) : SalesforcePaymentIntent
Gets the payment intent for the given basket.
static getPaymentIntent(order : Order) : SalesforcePaymentIntent
Gets the payment intent for the given order.
Methods inherited from class Object
Method Detail
attachPaymentMethod
static attachPaymentMethod(paymentMethod : SalesforcePaymentMethod, customer : Customer) : void
Attaches the given payment method to the given customer.
Parameters:
paymentMethod - payment method to attch to customer
customer - customer whose payment method to save
Throws:
Exception - if the saved payment method couldn't be attached to the customer

detachPaymentMethod
static detachPaymentMethod(paymentMethod : SalesforcePaymentMethod) : void
Detaches the given payment method from its associated customer. Once detached the payment method remains associated with payment intents in the payment account, but is no longer saved for use by the customer in future orders.
Parameters:
paymentMethod - payment method to detach from customer
Throws:
Exception - if the saved payment method couldn't be detached from its customer

getAttachedPaymentMethods
static getAttachedPaymentMethods(customer : Customer) : Collection
Returns a collection containing the payment methods attached to the given customer.
Parameters:
customer - customer whose payment methods to get
Returns:
collection of attached payment methods

getPaymentIntent
static getPaymentIntent(basket : Basket) : SalesforcePaymentIntent
Gets the payment intent for the given basket.
Parameters:
basket - basket to checkout and pay using Salesforce Payments
Returns:
The payment intent
Throws:
Exception - if the payment intent couldn't be retrieved for the basket

getPaymentIntent
static getPaymentIntent(order : Order) : SalesforcePaymentIntent
Gets the payment intent for the given order.
Parameters:
order - order paid using Salesforce Payments
Returns:
The payment intent
Throws:
Exception - if the payment intent couldn't be retrieved for the order

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.