Paypal-checkout-components: ppxo_close_no_token_cancelurl error when closing the popup while loading

Created on 19 Sep 2017  路  7Comments  路  Source: paypal/paypal-checkout-components

Description

When a user closes the Checkout popup while it's loading I get the warning ppxo_close_no_token_cancelurl

  • [x] Screenshots or videos that show the issue
    paypalbug

  • [x] Your code

    CREATE_PAYMENT_URL  = 'http://localhost:3000/paypal/create_payment';
    EXECUTE_PAYMENT_URL = 'http://localhost:3000/paypal/execute_payment';

    paypal.Button.render({
      locale: 'en_US',
      env: 'sandbox',

      payment: function() {
        return new paypal.Promise(function(resolve, reject) {
          $('.paypal-overlay').fadeIn();
          $.post(CREATE_PAYMENT_URL)
            .done(function(data) { resolve(data.paymentID); })
            .fail(function(err)  { $('.paypal-overlay').fadeOut(); });
        });
      },

      onAuthorize: function(data) {
          console.log('The payment was authorized!');
          console.log('Payment ID = ',   data.paymentID);
          console.log('PayerID = ', data.payerID);

          $.post(EXECUTE_PAYMENT_URL, { paymentID: data.paymentID, payerID: data.payerID })
            .done(function(data) {
              window.location = '/payments/summary'
            })
            .fail(function(err)  {
              window.location = '/payments/cancelled'
            });
      },

      onCancel: function(data) {
        window.location = '/payments/cancelled'
      }

    }, '#paypal-buynow');

Steps to reproduce

  1. Click on Checkout
  2. Close the Checkout popup before it finishes loading

Affected browsers

  • [x] Chrome
  • [x] Firefox
outdated

Most helpful comment

Thanks for the report. This is definitely an issue -- ideally I'd like to call onCancel in these scenarios. There are a few internal reasons why this adds a little complexity to the checkout.js script, but I'll keep this open since I'd like to get this prioritized at some point.

All 7 comments

Thanks for the report. This is definitely an issue -- ideally I'd like to call onCancel in these scenarios. There are a few internal reasons why this adds a little complexity to the checkout.js script, but I'll keep this open since I'd like to get this prioritized at some point.

@bluepnume Thank you for the answer. Can you please tell me if I can somehow catch this error myself and handle it? Or if there's any alternative to integrate PayPal like checkout js? I wouldn't know if the user closed the pop-up and I'm afraid this issue will affect user experience

I'm afraid I don't have any short term solves at the moment. My advice for now, would be to give the buyer sufficient options on the page with the PayPal button, so they aren't blocked from doing whatever they want to do when they close the popup.

If it helps, looking at the logs on our side, the number of times this situation happens is pretty low.

@bluepnume Is there an ETA for resolution?

@bluepnume i would also need a fix for this issue - is there any update on this?

This should be resolved now. Please clear your browser cache and let me know if you still see the issue. Thanks!

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrMooky picture MrMooky  路  3Comments

Wr4i7h picture Wr4i7h  路  4Comments

deejbee picture deejbee  路  5Comments

stevedeighton picture stevedeighton  路  6Comments

VivekVikranth picture VivekVikranth  路  6Comments