Model for payment processing functionality.
module:models/PaymentProcessorModel
The PaymentProcessorModel class
Classes
Methods
(inner) PaymentProcessorModel/authorize(order, paymentInstrument)
Executes the provider and method-specific payment authorization logic. The payment provider and method-specific logic is executed using a dynamic hook. The hook to execute is identified by the key 'app.payment.processor.' + processor.ID. The method executed is named 'Authorize'. If no payment provider and method-specific specific hook can be found, the method 'Authorize' of the default hook 'app.payment.processor.default' is executed.
Parameters:
Name | Type | Description |
---|---|---|
order |
dw.order.Order |
The order to authorize. |
paymentInstrument |
dw.order.PaymentInstrument |
The payment instrument to execute the authorization logic for. |
Returns:
whatever is returned from calling the hook.
(inner) PaymentProcessorModel/handle(cart, paymentMethodID) → {*}
Executes the provider and method-specific form validation and payment instrument creation. The payment provider and method-specific logic is executed using a dynamic hook. The hook to execute is identified by the key 'app.payment.processor.' + processor.ID. The method executed is named 'Handle'. If no payment provider and method-specific hook can be found, the method 'Handle' of the default hook 'app.payment.processor.default' is executed.
Parameters:
Name | Type | Description |
---|---|---|
cart |
dw.order.Basket |
The order to validate. |
paymentMethodID |
String |
The ID of payment method to execute the validation logic for. |
Returns:
- Type
- *