I am trying to understand how to integrate PayPal Express Checkout in Java, now at first I was successful to apply the scenario where customer approve payment by sending the below request and then getting the approve HATEOAS ref link:
curl -v -X POST https://api.sandbox.paypal.com/v2/checkout/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d '{
"intent": "AUTHORIZE",
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "100.00"
}
}
]
}'
After that I capture the request where it appears that both customer and seller transactions are okay. But when trying to pay with another currency_code
like for example MAD
I get the below error:
{"name":"UNPROCESSABLE_ENTITY","details":[{"location":"body","issue":"CURRENCY_NOT_SUPPORTED","description":"Currency code is not currently supported. Please refer https://developer.paypal.com/docs/integration/direct/rest/currency-codes/ for list of supported currency codes."}],"message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"","links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-CURRENCY_NOT_SUPPORTED","rel":"information_link","method":"GET"}]}
Is there any workaround to force multiple currencies on checkout? Or how to implement currency conversion?