[Documentation] If popup closes immediately
See original GitHub issueπ Describe the Issue
I have the problem that when I try to press the paypal button a second time after closing the popup window from the first time, the paypal popup window closes immediately.
π Actual Behavior
After logging into the popup window with a sandbox account and closing it, I get the error:
Create Subscription Api response error:
{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "...",
"details": [
{
"issue": "PERMISSION_DENIED",
"description": "You do not have permission to access or perform operations on this resource."
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#NOT_AUTHORIZED",
"rel": "information_link",
"method": "GET"
}
]
}
The error appears only if the endpoint https://www.sandbox.paypal.com/graphql?UpgradeFacilitatorAccessToken was called. Which happens on the login in the window.
π€ Expected Behavior
The window should stay in front of the application.
My Solution
The endpoint UpgradeFacilitatorAccessToken seems to be updating a token, so maybe the props are outdated of the button. So I added the method refreshProps to the onCancel Event:
onCancel: function (data, actions) {
button.updateProps();
},
Now the popup window stays in front of my application no matter how many times I close it. Maybe you could extend a troubleshooting section in the documentation?
With best regards Niclas
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8
Top Related StackOverflow Question
A fix is going for this hopefully today. The issue is that when the token is upgraded, it is missing the subscriptions scope. We will be preventing this upgrade for subscriptions.
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.