Skip to content
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

Meaningful errors #170

Open
emartynov opened this issue Jul 27, 2023 · 9 comments
Open

Meaningful errors #170

emartynov opened this issue Jul 27, 2023 · 9 comments

Comments

@emartynov
Copy link

Is your feature request related to a problem? Please describe.

I'm testing payment with credit card, and I'm getting an error

Error: 422 - Description: The requested action could not be performed, semantically incorrect, or failed business validation. -> [Issue: UNPROCESSABLE_ENTITY.
Error description: UNPROCESSABLE_ENTITY]

I don't know what does it mean. If I can recover from it or not.

Describe the solution you'd like.

It would be great to have or more concrete error or maybe there is table related to the error code that makes it clear.

@sshropshire
Copy link
Collaborator

@emartynov can you provide a test card that I can use to reproduce this issue? And was this the result of a CardClient#approveOrder() call?

@Angie20182
Copy link

Angie20182 commented Aug 29, 2023

EC-R_fbH5NsKf1jAcy4Va0y5g_QCIXuWz5M0RToqa406nNZ4GXbuOstut9VBWexnxoNQ-CKFlT8B6LHM [email protected]

@CharlesMuchogo
Copy link

CharlesMuchogo commented Jan 20, 2025

Hi @sshropshire I'm stuck at this error. This is my implementation. I/m using version 2.0.0-beta2 of the android sdk

@sshropshire
Copy link
Collaborator

sshropshire commented Jan 21, 2025

Hey @CharlesMuchogo thanks for raising this. I'll try to reproduce on my end and see if we can surface a better error message. In the meantime, could you try 5.00 for the amount to see if it works? My guess is it's something with the request payload we send that's malformed. Actually never mind, I sometimes forget that the order creation amount is sent server-side.

@sshropshire
Copy link
Collaborator

@CharlesMuchogo I'm having trouble reproducing this at the moment. Is there any chance you can open the Network Inspector in Android Studio and provide us with the full HTTP error response? It may provide the additional information we need to reproduce so we can surface a better error message.

@CharlesMuchogo
Copy link

Hey @sshropshire I'm having issues trying the payment with my Network inspector open. I get this error

Image

but running without the Network Inspector, I get this one

Image

This is the screenshot of the Network Inspector running when I get the first error

Image

@CharlesMuchogo
Copy link

@sshropshire I have updated my repo with a sample client and secret id and prefilled my sample card details. You can try to reproduce it now

@sshropshire
Copy link
Collaborator

Hey @CharlesMuchogo I was able to reproduce the error you're experiencing with the demo app you sent. As an experiment, I replaced the CLIENT_ID/CLIENT_SECRET vals in PreferenceManager with a set of credentials associated with a US merchant. After replacing the credentials everything worked as expected.

We have a feeling that this may be an eligibility issue and not specifically an Android issue. You can verify your Sandbox merchant's location and eligibility here: https://developer.paypal.com/docs/checkout/advanced/eligibility/.

We did also notice that the error message is not very descriptive and we will forward this feedback internally to the appropriate teams.

@CharlesMuchogo
Copy link

Thanks a lot @sshropshire. I'll verify my sandbox merchant location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants