Features added to version 1.1.7


The followings are details of new features added to javascript sdk 1.1.7 version used for Iamport payment integration. The use of CDN is recommended.

Supports PayPal popup mode and callback function

When a payment is requested, by specifying the 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
    }
  });

In previous versions, it was only supported to redirect to m_redirect_url when PayPal payment is completed or aborted.

Supports callback function for X button in mobile authentication (Danal) popup

During the mobile authentication (Danal), if the popup window was closed (pop-up method) or the cancel button on the window was clicked, the callback function of IMP.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)
    }
  });