popup : true
, the Paypal payment process is performed in a separate pop-up window without moving the page.
In the case of the pop-up method, the IMP.request_pay(param, handler)
callback function (handler) is called after payment is completed. // Refer to popup : true option and callback function registration (Other parameters are omitted)
IMP.request_pay({
pg: "paypal",
popup: true,
...
...
}, function(rsp) {
if ( rsp.success ) {
// Paypal payment was successful and the payment verification logic starts here
} else {
// Paypal payment was aborted or failed
}
});
m_redirect_url
when PayPal payment is completed or aborted.
X button
in mobile authentication (Danal) popupIMP.request_pay(param, handler)
was properly called. However, there was a bug where the callback function was not called when the X button
was clicked (layer method).
Starting from version 1.1.7
, it provides a consistent behavior calling the callback function when the X button is clicked. // popup : true option
IMP.certification({
merchant_uid : "Transaction ID for mobile authentication",
popup: true
}, function(rsp) {
if ( rsp.success ) {
// The authentication is successful
} else {
// The authentication is failed or aborted (When popup is closed or the X/cancel button is clicked)
}
});