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

[BUG]: approve subscription throw error: Buyer access token not present

Open ArtemFokin opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

🐞 Describe the Bug

Hello I've created a subscription in createSubscription handler, like actions.subscription.create({...}) But after user pay it, i receive subscription with APPROVAL_PENDING status. After few delay status changed to ACTIVE, but how i can approve it immediately on client side? May be something like order.capture(). I've found a actions.subscription.activate() method in onApprove(data, actions) handler, but it's throw some errors: Buyer access token not present. I also tried send subscriptionId to backend and check if status APPROVAL_PENDING activate subscription(but, may be, it's unsafe)
Can someone describe subscription flow with immediately ACTIVE status.

😕 Current Behavior

No response

🤔 Expected Behavior

No response

🔬 Minimal Reproduction

No response

🌍 Environment

| Software         | Version(s)     |
| ---------------- | ----------     |
| react-paypal-js  |     7.8.1      |
| Browser          |   Chrome 103   |
| Operating System | MacOS Monterey |

Relevant log output

No response

Code of Conduct

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

➕ Anything else?

No response

ArtemFokin avatar Jul 29 '22 10:07 ArtemFokin