Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using (구) 토스페이먼츠 test PG and cancel Payment window, callback is not executed. #65

Open
benderillo opened this issue Sep 2, 2022 · 0 comments

Comments

@benderillo
Copy link

benderillo commented Sep 2, 2022

Environment

  • React application on PC
  • jQuery: 1.12.4
  • iamport sdk: 1.1.8 (https://cdn.iamport.kr/js/iamport.payment-1.1.8.js)

Description
When trying to make payments in test mode our code calls iamport method (IMP.request_pay()) but if we cancel the payment window (or close it), the iamport iframe does not disappear and the callback is not called.

Here is how we call it:

  const params = {
        pg: 'uplus.testmuid',
        pay_method: 'card',
        merchant_uid: "order001",
        name: `test product`,
        amount: 10000,
        currency: 'krw',
        buyer_email: "john@doe.com",
        buyer_name: "John Doe",
        language: 'ko',
       company: "Super store"
  };

  IMP.request_pay(params, (rsp) => {
    console.log("callback is called!");
  });

When we use nicepay PG in the test mode, we don't have this issue. The iframe is removed and the callback is properly called.

Actual behaviour
The payment window iframe does not disappear when the payment window is closed/cancelled. It leaves semi-transparent overlay over the entire browser viewport.
The callback is not called to notify our app that the payment was cancelled.

** Expected behaviour**
Closing payment window should remove the iframe and the callback should be called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant