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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Payment is blocking #362

Closed
huweihong opened this issue Apr 14, 2023 · 2 comments
Closed

[Bug] Payment is blocking #362

huweihong opened this issue Apr 14, 2023 · 2 comments

Comments

@huweihong
Copy link

馃悶 Test card in sandbox are not working

I used the test card in sandbox to payment. But the test card are not working. I used https://developer.paypal.com/api/rest/sandbox/card-testing/#link-creditcardgeneratorfortesting to generate test card many times. But the error is still there.

馃敩 Minimal Reproduction

The code is following:

<script
    src="https://www.paypal.com/sdk/js?client-id={PAYPAL_CLIENTID}&currency=AUD&components=buttons,hosted-fields,funding-eligibility&locale=en_US"
    on:load={payPalLoaded}
  ></script>
let payPalLoaded = () => {
    const payPalButtons = paypal.Buttons();
    paypal
      .Buttons({
        style: {
          layout: 'vertical',
          shape: 'rect',
          label: 'paypal',
        },
        fundingSource: paypal.FUNDING.CARD,
        createOrder: async function (data, actions) {
          return actions.order.create({
            purchase_units: [
              {
                description: `Pay for Test`,
                amount: {
                  currency_code: 'AUD',
                  value: 0.01,
                },
              },
            ],
          });
        },
        onApprove: function (data, actions) {
          // This function captures the funds from the transaction.
          console.log('onApprove--', data);
          return actions.order.capture().then(function (details) {
            console.log('details of transcation: ', details);
            dispatch('succeed');
          });
        },
      })
      .render('#paypal-button-container');
  };

馃槙 Actual Behavior

The payment are blocking.

image

馃 Expected Behavior

The payment can go ahead.

馃實 Environment

  • Node.js/npm: - npm 9.6.4, node v16.13.2
  • OS: - macOs 10.15.7
  • Browser: - Chrome
@huweihong
Copy link
Author

I found that my code was outdated. Then I changed my codes according the document. The payment is ok for several days. But now it's still error. Is paypal limiting the flow? It feels like this problem is intermittent.

@wsbrunson
Copy link
Member

hi @huweihong are you still having this issue?

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

No branches or pull requests

3 participants
@huweihong @wsbrunson and others