react-paypal-js icon indicating copy to clipboard operation
react-paypal-js copied to clipboard

[BUG]: Sometimes can't get subscription details after successful approve

Open salievos opened this issue 2 years ago • 11 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

🐞 Describe the Bug

Sometimes we can't get subscription details after creating it, and we see that paypal is creating subscription and charge. Event if we try request data with some sleep function after 3 seconds. We can't catch this issue, and wrote some logging code inside try catch block with logging JSON.stringify(e) and it's just empty {}

😕 Current Behavior

When our client is trying to subscribe on some plan and approves payment on checkout page, we trying to get subscription details:

const onApprove = (data: OnApproveData, actions: OnApproveActions) => {
  try {
    const details = await actions?.subscription?.get();
  } catch (e) {
    console.log(JSON.stringify(e));
  }
};

<PayPalScriptProvider
  options={{
    'client-id': 'CLIENT-ID',
    'disable-funding': 'credit,card',
    vault: true,
    currency: 'USD',
  }}
>
  <PayPalButton
    onError={() => { /* handle error code */  }}
    onApprove={onApprove}
    createSubscription={() => { /* handle creating subscription code*/  }}
  />
</PayPalScriptProvider>

🤔 Expected Behavior

When the client approves the payment, we should be able to get the subscription details

🔬 Minimal Reproduction

Somehow we can't reproduce it, usually it happens randomly

🌍 Environment

| Software         | Version(s) |
| ---------------- | ---------- |
| react-paypal-js  |   7.3.3    |
| Browser          |    any     |
| Operating System |    any     |

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

➕ Anything else?

No response

salievos avatar Sep 29 '23 08:09 salievos

@devchristina please, take a look to this issue

salievos avatar Oct 02 '23 11:10 salievos

Sent this to the product team to research.

devchristina avatar Oct 02 '23 21:10 devchristina

@devchristina thanks, will be waiting update

salievos avatar Oct 03 '23 08:10 salievos

Hi, we are all in the same situation @devchristina.

I need to take a decision on it at the end of the day (if change PayPal to another payment gateway or not).

Please, we are all waiting for an update.

seedj avatar Oct 04 '23 08:10 seedj

@devchristina Hi, are there any updates?

salievos avatar Oct 13 '23 10:10 salievos

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Nov 28 '23 01:11 github-actions[bot]

still affecting

salievos avatar Nov 28 '23 08:11 salievos

We had to change to Stripe the whole checkout process to avoid this issue.

PayPal 👎

seedj avatar Nov 28 '23 08:11 seedj

@devchristina hi, any updates?

salievos avatar Dec 27 '23 08:12 salievos

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Feb 11 '24 01:02 github-actions[bot]

still affecting

salievos avatar Feb 12 '24 16:02 salievos

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Mar 30 '24 01:03 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

github-actions[bot] avatar Apr 04 '24 01:04 github-actions[bot]