onModalOpen
This event fires when the ChargeAfter modal opens, which enables optional blocking on the merchant website such as preventing clicks or scrolling.
Code sample
function onModalOpen(){
// here you can do something like blocking scrolling, removing loader in case you added
// it on the Checkout/Apply buttons when opening the ChargeAfter modal
}
// can be sent in Checkout/Apply flows
// Apply
ChargeAfter.payments.present('apply', {..., onModalOpen});
// Checkout
ChargeAfter.payments.present('checkout', {..., onModalOpen});
Updated 2 months ago
What’s Next