react-paypal-js
react-paypal-js copied to clipboard
[BUG]: Sometimes can't get subscription details after successful approve
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
@devchristina please, take a look to this issue
Sent this to the product team to research.
@devchristina thanks, will be waiting update
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.
@devchristina Hi, are there any updates?
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!
still affecting
We had to change to Stripe the whole checkout process to avoid this issue.
PayPal 👎
@devchristina hi, any updates?
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!
still affecting
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!
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!