Hey!
I’ve been having this same issue on every paypal gateway that I create, whether it is a sandbox gateway or a live gateway.
I have reached out to support and this is what I was given:
"- Phone number is invalid. Putting “aasdfasdf” inside phone number box will cause the error since Paypal expects a real phone number (same applies for the country)
- Country code is invalid (For example, full country name is set as name instead of GB, US…etc or there is a space in the country code set as C A instead of CA)
- The currency is invalid
- Having space in page url
- Wrong paypal credentials: Check is that you added your PayPal credentials correctly:
- If doing test purchases: use your sandbox credentials
- If doing live purchases: use your real credentials
In both cases, make sure that you copied the whole client id and secret key and pasted it without pressing the tab key or adding extra spaces.
Have a look at the article here for the details: PayPal | Funnelish Docs"
After following all steps still having the same errors.
Next I went into paypal developer because I see the requests coming in there but every request is thrown back with the same error 400. The following code is the response inside of my paypal developer when opening the error.
additional_properties": {},
“body”: {
“name”: “INVALID_REQUEST”,
“message”: “Request is not well-formed, syntactically incorrect, or violates schema.”,
“debug_id”: “f389441eb3be2”,
“details”: [
{
“field”: “/application_context/cancel_url”,
“value”: “xxxxxx”,
“location”: “body”,
“issue”: “INVALID_PARAMETER_SYNTAX”,
“description”: “The value of a field does not conform to the expected format.”
The error also gives me this link: https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX
According to this link, the error in this situation is one of these options:
-
INVALID_PARAMETER_SYNTAX
: The value of a field does not conform to the expected format.
Possible error locations:
/payment_source/paypal/attributes/vault/usage_type
/payment_source/paypal/attributes/vault/customer_type
/payment_source/paypal/attributes/vault/confirm_payment_token
/payment_source/paypal/attributes/customer/id
/payment_source/card/attributes/customer/id
/payment_source/apple_pay/attributes/customer/id
/payment_source/card/attributes/vault/confirm_payment_token
/payment_source/paypal/payment_method_preference
Just explaining my troubleshooting process and hopefully can get some help with this issue. If anyone can help this will help me out a ton and I can finally capture payments with paypal.
Thanks for any help!