@plentymarkets/shop-api / paymentProviderGetters
Variable: paymentProviderGetters ​
constpaymentProviderGetters:object
Defined in: getters/paymentProviderGetters.ts:119
Type Declaration ​
getIcon ​
getIcon: (
paymentMethod) =>string
Returns the icon URL of a payment method.
Parameters ​
paymentMethod ​
The payment method object.
Returns ​
string
The icon URL string, or null if not set.
getId ​
getId: (
paymentMethod) =>string
Returns the numeric ID of a payment method as a string.
Parameters ​
paymentMethod ​
The payment method object.
Returns ​
string
The payment method ID string, or "0" if not set.
getIdByPaymentKey ​
getIdByPaymentKey: (
paymentMethods,key) =>number
Finds the numeric ID of a payment method by its payment key.
Parameters ​
paymentMethods ​
The array of available payment methods.
key ​
string
The payment key to match.
Returns ​
number
The payment method ID, or -1 if no match is found.
getKey ​
getKey: (
paymentMethod) =>string
Returns the internal key of a payment method.
Parameters ​
paymentMethod ​
The payment method object.
Returns ​
string
The key string, or an empty string if not set.
getMethodOfPaymentId ​
getMethodOfPaymentId: (
cart) =>string
Returns the currently selected payment method ID from the cart as a string.
Parameters ​
cart ​
The cart object.
Returns ​
string
The method of payment ID string.
getName ​
getName: (
paymentMethod) =>string
Returns the display name of a payment method.
Parameters ​
paymentMethod ​
The payment method object.
Returns ​
string
The name string, or an empty string if not set.
getPaymentKey ​
getPaymentKey: (
paymentMethod) =>string
Returns the external payment key of a payment method.
Parameters ​
paymentMethod ​
The payment method object.
Returns ​
string
The payment key string, or an empty string if not set.
getPaymentMethodById ​
getPaymentMethodById: (
paymentMethods,id) =>PaymentMethod|null
Finds a payment method by its numeric ID.
Parameters ​
paymentMethods ​
The array of available payment methods.
id ​
number
The numeric ID of the payment method to find.
Returns ​
PaymentMethod | null
The matching PaymentMethod object, or null if not found.
isPaymentMethodExcluded ​
isPaymentMethodExcluded: (
shippingMethod,paymentMethodId) =>boolean
Returns whether the given payment method ID is excluded by the shipping method.
Parameters ​
shippingMethod ​
ShippingMethod | undefined
The selected shipping method (may be undefined).
paymentMethodId ​
number
The numeric ID of the payment method to check.
Returns ​
boolean
true if the payment method is excluded for the given shipping method, otherwise false.
isPaymentMethodUnavailable ​
isPaymentMethodUnavailable: (
paymentMethods,paymentMethodId) =>boolean
Returns whether the given payment method ID is unavailable (not present in the list).
Parameters ​
paymentMethods ​
The array of currently available payment methods.
paymentMethodId ​
number
The numeric ID of the payment method to check.
Returns ​
boolean
true if the payment method is not in the available list, otherwise false.