Payment Method
GetPaymentMethod
Gets a payment method from a specfic store.
Arguments
Name | Type | Default | Description |
paymentMethodId | long | | Id of the payment method. |
storeId | long | _storeId | Id of the store. |
async | boolean | false | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
paymentMethod | A payment method object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
paymentMethodId | long | Id of the payment method. |
Return values
Type | Description |
PaymentMethod | A payment method object. |
Example
GetPaymentMethods
Gets a collection of all payment methods that are allowed in the current payment country and payment country region.
Arguments
Name | Type | Default | Description |
storeId | long | _storeId | Id of the store. |
onlyAllowed | boolean | true | Specify if only payment methods allowed in the current session state will be returned. |
async | boolean | false | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
paymentMethod[] | A collection of payment methods. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
onlyAllowed | bool | Specify if only payment methods allowed in the current session state will be returned. |
Return values
Type | Description |
IEnumerable<PaymentMethod> | A collection of payment methods. |
Example
GetCurrentPaymentMethod
Gets the current payment method of the customer's session. If the customer has a current order the payment method of that order is returned.
Arguments
Name | Type | Default | Description |
storeId | long | _storeId | Id of the store. |
async | boolean | false | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
paymentMethod | A payment method object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
Return values
Type | Description |
PaymentMethod | The current payment method object. |
Example
SetCurrentPaymentMethod
Changes the current payment method of the customer's session. The payment method is also changed for the customer's current order if present.
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
paymentMethodId | long? | Id of the payment method to change to. |
Example
Arguments
Name | Type | Default | Description |
paymentMethodId | long? | | The payment method id. |
storeId | long | _storeId | Id of the store. |
async | boolean | true | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
methodsCalled | An object containing information about the methods called, related data to the methods and the order object if present.
Will only be returned if you use async = false |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
paymentMethodId | long? | Id of the payment method. |
Return values
Type | Description |
PaymentMethod | The new current payment method object. |
Example
GetPriceForPaymentMethod
Get the price for a specific payment method, based on the customers current currency, payment country and payment country region.
Arguments
Name | Type | Default | Description |
paymentMethodId | long | | Id of the payment method. |
storeId | long | _storeId | Id of the store. |
async | boolean | false | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
price | A price object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
paymentMethodId | long | Id of the payment method. |
Return values
Type | Description |
Price | A price object. |
Example
Last Updated: 12/27/2018, 4:46:55 PM