react-paypal-js: [BUG]: We are using PayPal Hosted Fields from library. The order is not approved when we call submit function from hostedFields, we are getting response with orderId but it is not approved it's status is still Created.

Is there an existing issue for this?

  • I have searched the existing issues.

🐞 Describe the Bug

we have implemented according to this storybook component. https://paypal.github.io/react-paypal-js/?path=/docs/paypal-paypalhostedfields--default we are facing an issue request urgent response.

πŸ˜• Current Behavior

No response

πŸ€” Expected Behavior

No response

πŸ”¬ Minimal Reproduction

No response

🌍 Environment

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

Relevant log output

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

βž• Anything else?

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 27

Most upvoted comments

Closing this issue for now. To summarize a few things that came up:

  1. When sending to/from accounts that are unverified transactions will end up in a pending state and not go through. Make sure to verify those accounts!
  2. Use the <PayPalHostedFieldsProvider> and <PayPalHostedField> components to safely link to credit card related fields (instead of manually populating the payment_source
  3. We now have a codesandbox link with a full-stack implementation you can look at for inspiration and more insight into what needs to happen on the server to complete a transaction: https://codesandbox.io/s/paypal-custom-payment-integration-b9il3r
  4. For general integration support please reach out to merchant technical support or use our paypal community forums

@ankuronweb Oh yeah sorry I was trying with a random card. Its working for me too with that number. I am trying to fork the sandbox and do some more debugging with the responses that come back, because I did get the same β€œCOMPLETED” response for the order but for me inside of the purchase_units the payment was always stuck on PENDING and the transaction never showed on my sandbox merchant account.

I will mess around with the sandbox, im currently having some issues forking it but should be able to start testing soon.