i'mport JavaScript SDK 1.1.7


Feature additions and changes

Added popup mode for PayPal

To open the payment window as pop-up, set popup: true when calling IMP.request_pay(param, callback). The callback function is called after the payment process is completed. Previous versions only support the page redirection mode.
  IMP.request_pay({
    pg: "paypal",
    popup: true,
    // ... Other parameters omitted ...
  }, function(rsp) {
    if ( rsp.success ) {
      // Payment successful
    } else {
      // Payment failed or terminated
    }
  });

Added redirection mode for Danal identity verification

To redirect to a page after identity verification, set the target page's URL in m_redirect_url when calling IMP.certification(param). Previous versions only support the callback mode.

For more information about using the redirection mode, refer to the Mobile Identity Verification page.
  // popup : true
  IMP.certification({
    merchant_uid : "Transaction ID",
    popup: true
  }, function(rsp) {
    if ( rsp.success ) {
      // Verification successful
    } else {
      //Verification failed or terminated (popup closed or Cancel button clicked)
    }
  });

Bug Fixes

The issue of callback not being invoked when you click the close button (X button) in the identity verification (Danal) pop-up

When you close the identity verification pop-up window or click the Cancel button on the page in the pop-up mode, the callback (handler) of IMP.certification(param) is invoked. This fix implements the same behavior for when the X button is clicked.