-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Payment via PayPal always fails. #405
Comments
@glennposadas You probably want to just send the nonce Try something like
Let us know if you're still having problems. |
Hi @demerino thank you for the reply, what took you guys to notice this open ticket posted 7 days ago? :( Anyways, inside that Didn't help though. I believe not using BraintreeDropIn causes this issue. I will confirm this within an hour. I have two projects that do not use BraintreeDropIn and. these two projects. have similar issues. And then here comes the third project, I used BraintreeDropIn there and I didn't have this issue. Oh btw, in my second project, I used to use BraintreeDropIn there and it used to work, but my team demanded that we should not use BraintreeDropIn, only then this issue came in. Now I have the time to revert everything back to BraintreeDropIn. Let me see if the issue will go away using that BraintreeDropIn. |
@glennposadas It looks like you're using two different accounts. The authorization you're using to setup your iOS client is from account A, but you're attempting to use that nonce to create a transaction with account B. A nonce can only be used with the account it was created with. Can you double check that you and your back end team are using the same API credentials for both front and back end? Fixing this mismatch should solve the issue. |
Hey @Epreuve thanks for the reply! I am pretty sure the clientToken my iOS client is for the PayPal sandbox account I am paying for. But again, it is weird that the Android client gets successful payment transaction everytime. My Android dev colleague mentioned to me as well that I can't just use BraintreeDropIn cause we're using Express Checkout and not Direct Payment, I'm not sure if that's correct. So I am supposed to work on this issue that has been here for a week. It happens in two iOS applications that I have right now. |
@glennposadas I just double checked the logs, and the client token generated was from a different account than the one that attempted to use the nonce to create a transaction. The issue is likely the credentials being used to generate the client token at your endpoint, are from a different account than those being used by the code on the server that's attempting to make the transaction. Using the same credentials in both environments should solve the problem. If you're hardcoding a token or using a tokenization key for testing, you'll need to make sure that it's from the same account who's credentials are being used to create transactions. If you'd like specifics around the accounts we're seeing tied to the nonce in your issue, feel free to reach out to our support team. They can send more specifics directly, than we would like to share on an open medium like Github. |
Thank you so much for the help, @Epreuve . We've discovered something.
happens in PayPal Balance option. -- Question is, what do we need to do with the PayPal to make the PayPal balance option working? |
I guess we can now close this, but uhhh the PayPal Balance issue still needs to be resolved. Thanks for the help! |
@glennposadas That error might be related to this thread. Could you take a look and try the steps outlined to see if it resolves the |
General information
Issue description
As the title says, my payment (in iOS) always fails. While apparently, the payment in my colleague's work (Android) succeeds.
I followed thoroughly the sample codes and guidelines from here: https://developers.braintreepayments.com/guides/paypal/client-side/ios/v4
In iOS, after all the process (Client Token from our Server --> BT SDK --> PayPal browser --> App --> send nonce to our server), the error I get from our server is always:
My backend guy does not know the reason behind this too, he only showed and gave me this log:
BTW, here's what I do in setting up my SDK:
The text was updated successfully, but these errors were encountered: