Patching shipping data does not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We implemented patching order data when customer cancels payment, change something in order, and then starts payment again.
At first we had patching for order price only, and that worked fine. Now we need to patch shipping data as well. It was implemented according to documentation (https://developer.paypal.com/docs/api/orders/v2/#orders_patch), to update shipping/name and shipping/address separately. Request looks correct, and we also get correct response from PayPal API (204 code). But the problem is that shipping address stays unchanged, so it's the same as when order was created.
Interesting though that price patching still works fine.
Is it known bug, or documentation is misleading, or it's a sandbox thing only? Can somebody help me here please, I've spent q sometime implementing shipping data pathing, and don't want to throw it away.
Request:
{
"PayPalCheckoutSdk\\Orders\\OrdersPatchRequest":{
"path":"/v2/checkout/orders/76T1953323889863C?",
"body":[
{
"op":"replace",
"path":"/purchase_units/@reference_id=='default'/amount",
"value":{
"currency_code":"EUR",
"value":20.35
}
},
{
"op":"replace",
"path":"/purchase_units/@reference_id=='default'/shipping/name",
"value":{
"full_name":"[new value]"
}
},
{
"op":"replace",
"path":"/purchase_units/@reference_id=='default'/shipping/address",
"value":{
"address_line_1":"[new value]",
"admin_area_2":"[new value]",
"postal_code":"[new value]",
"country_code":"NL"
}
}
],
"verb":"PATCH",
"headers":{"Content-Type":"application/json"}
}
}
Response:
{
"PayPalHttp\\HttpResponse":{
"statusCode":204,
"result":null,
"headers":{
"":"",
"Cache-Control":"max-age=0, no-cache, no-store, must-revalidate",
"Date":"Mon, 26 Apr 2021 14",
"Paypal-Debug-Id":"dee236aa1808a"
}
}
}
- Labels:
-
Payments REST APIs
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Shipping options are not appearing in my cart through link or button. in PayPal Payments Standard
- User is asked for shipping address when creating a credit card order in REST APIs
- Updating Shipping details for digital orders using API in REST APIs
- My Shopify checkout keeps looping and not letting customers complete the payment through PayPal. in PayPal Payments Standard
- Checkout Button Multi-Item Shipping Discount in PayPal Payments Standard