Node.js API abstraction for payment gateways.
Used by supported gateways listed in easy-payment.
BaseGateway()
BaseGateway#attachCard()
BaseGateway#removeCard()
BaseGateway#getBindings()
BaseGateway#payOrder()
BaseGateway#getOrderStatus()
BaseGateway#freezeOrder()
BaseGateway#reverseOrderProfile()
BaseGateway#depositOrder()
BaseGateway#refundOrder()
Allow to add new card in payment gateway merchant account.
order
(object)
'amount'
(string): The amount of the transaction.'orderNumber'
(string): The orderNumber of the transaction.'language'
(string): The language of the transaction.'pageView'
(string): The pageView of the transaction.'returnUrl'
(string): The returnUrl of the transaction.'description'
(string): The description of the transaction.'clientId'
(string): The clientId of the transaction.'currency'
(string): The currency code of the transaction.
other
(object)
Other fields specific to a gateway SDK implementation. Refer to specific SDK for more details.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'err'
: The original error response from the gateway.'data'
: The original response from the gateway.
Removing added card from payment getaway merchant.
bindingId
(string): The bindingId of the transaction.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'err'
: The original error response from the gateway.'data'
: The original response from the gateway.
Returned existed payment getaway merchant account bindings.
clientId
(string): The clientId of the transaction.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'err'
: The original error response from the gateway.'data'
: The original response from the gateway.
Paying order.
order
(object)
'orderNumber'
(string): The orderNumber of the transaction.'language'
(string): The language of the transaction.'pageView'
(string): The pageView of the transaction.'amount'
(number): The amount of the transaction.'returnUrl'
(string): The returnUrl of the transaction.'description'
(string): The description of the transaction.'clientId'
(string): The clientId of the transaction.'currency'
(string): The currency of the transaction.'bindingId'
(string): The bindingId of the transaction.'useBinding'
(boolean): If true, the pay will use the bindingId of the transaction.
Other fields specific to a gateway SDK implementation. Refer to specific SDK for more details.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'orderId'
(string): The created orderId response from the gateway.'err'
: The original error response from the gateway.'data'
: The original response from the gateway.
Getting order status.
order
(object)
'orderId'
(string): The orderId of the transaction.'extended'
(boolean): If true, get extended order status.
Other fields specific to a gateway SDK implementation. Refer to specific SDK for more details.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'err'
: The original error response from the gateway.'data'
: The original response from the gateway.
Freezing order.
order
(object)
'orderNumber'
(string): The orderNumber of the transaction.'language'
(string): The language of the transaction.'pageView'
(string): The pageView of the transaction.'amount'
(number): The amount of the transaction.'returnUrl'
(string): The returnUrl of the transaction.'description'
(string): The description of the transaction.'clientId'
(string): The clientId of the transaction.'currency'
(string): The currency of the transaction.'bindingId'
(string): The bindingId of the transaction.'useBinding'
(boolean): If true, the freeze will use the bindingId of the transaction.
Other fields specific to a gateway SDK implementation. Refer to specific SDK for more details.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'orderId'
(string): The frozen orderId response from the gateway.'err'
: The original error response from the gateway.'data'
: The original response from the gateway.
Cancellation order.
order
(object)
'orderId'
(string): The orderId of the transaction.'language'
(string): The language of the transaction.'currency'
(string): The currency of the transaction.
Other fields specific to a gateway SDK implementation. Refer to specific SDK for more details.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'err'
: The original error response from the gateway.'data'
: The original response from the gateway.
Completion of order payment.
order
(object)
'orderId'
(string): The orderId of the transaction.'language'
(string): The language of the transaction.'currency'
(string): The currency of the transaction.'pageView'
(string): The pageView of the transaction.'amount'
(number): The amount of the transaction.
Other fields specific to a gateway SDK implementation. Refer to specific SDK for more details.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'err'
: The original error response from the gateway.'data'
: The original response from the gateway.
Refund of order payment.
order
(object)
'orderId'
(string): The orderId of the transaction.'language'
(string): The language of the transaction.'currency'
(string): The currency of the transaction.'amount'
(number): The amount of the transaction.
Other fields specific to a gateway SDK implementation. Refer to specific SDK for more details.
Returns a Promise
with the following object as a result:
'hasError'
(boolean): Identifier of the transaction status.'errorStep'
(string): Exist when error is happens for methods with many API/SDK requests'err'
: The original error response from the gateway.'data'
: The original response from the gateway.