You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going further, looks like the PayPal response JSON are different while in live mode.
Got this from the execute function: The data couldn’t be read because it isn’t in the correct format.
I have found the problem. There is nothing to do with live or sandbox mode. The issue was in the shipping address in the transaction array in the returned PayPal response. In my case, I have used my PayPal account to make a real purchase and since I live in Japan the state of my address in PayPal is TOCHIGI but in your model Address.swift you are using the enum Province for the state property that has a case for TOCHIGI-KEN. This was causing the encode to fail and Swift was returning a 400 status error code. I have changed the state property to be a String instead of the Province enum and it solved the issue. I believe any transaction from Japan will fail because of this. The -KEN is correctly used but somehow PayPal is not using it.
fabrijp
changed the title
Getting status error 400 when in live mode
Getting status error 400 when payee address are from Japan
Jul 18, 2020
Hello.
I'm able to execute a payment successfully in sandbox mode but got status error 400 when in live mode.
Here is the code when executing the payment for both modes:
}
Any thoughts ? Thank you
The text was updated successfully, but these errors were encountered: