Listen to payment notifications
Enabling the Payment Hook js-notifications gives you the instant and optimal feedback as the consumer is going through the Payment process.
js-notifications requires a local function called PaymentListener to send the feedback back to you.
When the payment hook is added and the function is in place, you are ready to activate the PaymentStatus feedback.
This is done with the function BackToBackActivatePaymentstatus and registering the status field.
var payment_hooks = {
'js-notifications' : '1'
};
function PaymentListener(status) {
console.log(status);
}
BackToBackActivatePaymentStatus();
BackToBackPaymentListener.register('status',BackToBackPaymentStatus);
The full Payment Window sample will be as following