paypal / paypal-js

Loading wrapper and TypeScript types for the PayPal JS SDK
Apache License 2.0
224 stars 75 forks source link

[BUG]: Sometimes paypal subscription details along with total not showing. #512

Open SantoshKumarRavi opened 3 months ago

SantoshKumarRavi commented 3 months ago

Is there an existing issue for this?

šŸž Describe the Bug

I am using below constants for making subscription. I am using sandbox for testing.

  <PayPalScriptProvider
          options={{
            clientId: "xxxxxx",
            components: 'buttons',
            intent: 'subscription',
            vault: true,
          }}
        >
 <PayPalButtons
            fundingSource={'paypal'}
            forceReRender={[purchasedSeats, selectedPlan]}
            createSubscription={async () => {
              const subscriptionId =
                await handleCreateNewSubscription(selectedPlan);

              return subscriptionId || Promise.reject(UNHANDLED_ERROR);
            }}
          />

if i pay with paypal button, 8/10 times paypal is opening pop up with subscription details. But 2/10 times sandbox is opening popup without subscription details. even I tried to complete the payment in unexpected scenario, transaction is not complete from both front end backend. I compared URL in pop up window for both scenarios. routes are mismatching. Expected results URL route contains the route checkout/selectFi additionally at end but it is not having in unexpected times. if I refresh the URL in same pop window, it is working.

https://www.sandbox.paypal.com/checkoutnow?sessionID=uid_xxxxx&buttonSessionID=uid_5xxxxx&stickinessID=uid_xxxxx&smokeHash=&sign_out_user=false&fundingSource=paypal&buyerCountry=IN&locale.x=en_US&commit=true&client-metadata-id=uid_xxxx&standaloneFundingSource=paypal&branded=true&clientID=xxxxxx&env=sandbox&sdkMeta=xxxxxxxx&xcomponent=1&version=5.0.440&token=xxxxxxx/checkout/selectFi

šŸ˜• Current Behavior

Screenshot (2032)

šŸ¤” Expected Behavior

Screenshot (2030)

šŸ”¬ Minimal Reproduction

No response

šŸŒ Environment

| Software         | Version(s) |
| ---------------- | ---------- |
| react-paypal-js  | 8.3.0      |
| Browser          | Chorme     |
| Operating System | windows    |

Relevant log output

No response

Code of Conduct

āž• Anything else?

No response

wsbrunson commented 2 months ago

We have moved this repository to our paypal-js monorepo: https://github.com/paypal/paypal-js

We will be archiving this repo at the end of the day which will turn off Issues activity. If this is still an issue for you, please re-open this issue here:

Transferring this issue here: https://github.com/paypal/paypal-js/issues

SantoshKumarRavi commented 2 months ago

Thanks for informing. Error is still there