Hi, v2.0 is working fine in Chrome but failing in Safari (Desktop), error saying something like “An error occured”.
I downgraded to 1.9.5, Firefox is working well, but now Safari is displaying this error “MISSING_SHIPPING_ADDRESS The shipping address is required when shipping_preference=SET_PROVIDED_ADDRESS
.”
Same with the 2.0.1 RC1 version, Safari is not working as well as Firefox
This is debug log:
DEBUG POST https://api.paypal.com/v2/checkout/orders
Request Body: {"intent":"CAPTURE","purchase_units":[{"reference_id":"default","amount":{"currency_code":"EUR","value":"49.50","breakdown":{"item_total":{"currency_code":"EUR","value":"45.45"},"shipping":{"currency_code":"EUR","value":"0.00"},"tax_total":{"currency_code":"EUR","value":"8.59"},"discount":{"currency_code":"EUR","value":"4.54"}}},"description":"","items":[{"name":"XXXXXXXXXXXXXX","unit_amount":{"currency_code":"EUR","value":"45.45"},"quantity":1,"description":"","sku":"19301302","category":"PHYSICAL_GOODS"}],"payee":{"merchant_id":"XXXXXXXXXXXX"},"shipping":{"name":{"full_name":" "},"address":{"country_code":"ES","address_line_1":"XXXXXXXXXXXXXXXXX","admin_area_1":"A","postal_code":"03540"}}}],"application_context":{"user_action":"CONTINUE","shipping_preference":"SET_PROVIDED_ADDRESS","landing_page":"LOGIN","locale":"es-ES","brand_name":"XXXXXXXX","return_url":"https:\/\/www.xxxxxxxxxx.com\/?wc-ajax=ppc-return-url","cancel_url":"https:\/\/www.xxxxxxxxx.com\/xxxxxx-xxxx\/"},"payer":{"email_address":"[email protected]","name":{"given_name":"Xavier","surname":"xxxxxxxxx"},"address":{"country_code":"ES","address_line_1":"AAAAAAAAAAAA","admin_area_1":"A","admin_area_2":"AAAAAAAAA","postal_code":"xxxxx"},"phone":{"phone_type":"HOME","phone_number":{"national_number":"11111111111"}}},"payment_method":{"payee_preferred":"UNRESTRICTED","payer_selected":"PAYPAL"}}
Response Debug ID: 311a028406404
Response: Array
(
[code] => 422
[message] => Unprocessable Entity
)
Response Body: {"name":"UNPROCESSABLE_ENTITY","details":[{"field":"/purchase_units/@reference_id=='default'/shipping/address/admin_area_2","issue":"CITY_REQUIRED","description":"The specified country requires a city (address.admin_area_2)"}],"message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"311a028406404","links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-CITY_REQUIRED","rel":"information_link","method":"GET"}]}
2022-12-13T11:52:44+00:00 WARNING Failed to create order. PayPal API response: [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-CITY_REQUIRED
2022-12-13T11:52:44+00:00 INFO Invalid shipping address for order creation, retrying without it.
Hope it helps someone.
-
This reply was modified 1 year, 11 months ago by xbaeza.