Add the functionality for the popup window from Afterpay.
Add the preference popup_window in the payment_method and store that result in the data attribute in the div.
Add if statement checking whether the value of the data attribute is true or false; if true, it will run the openAfterpayWindow function; else, it will run the redirect from Afterpay.
Afterpay Popup Window
Add the functionality for the popup window from Afterpay.
Add the preference
popup_window
in thepayment_method
and store that result in the data attribute in the div.Add if statement checking whether the value of the data attribute is true or false; if true, it will run the
openAfterpayWindow
function; else, it will run the redirect from Afterpay.fix #13