.. does not ship to this location. Please use a different address.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
we unfortunately have the following problem:
The customer adds an item to their shopping cart and then clicks on the "PayPal Checkout" button in the shopping cart area ("Standard Checkout JavaScript SDK" + PHP). After the customer logs into the PayPal checkout pop-up window, an error message appears stating "Shop X does not ship to this location. Please use a different address." - and the "Complete Purchase" button is disabled.
The error occurs both in live mode and in sandbox mode.
It's strange that this code has been working without any problems for months and now, without any changes, has been giving the error message described for 8-10 days.
Since we passed "debug=true" when loading the JS SDK, we have been able to narrow down the error a bit - here is the error message from the debug:
respond::err patch() https://www.dev....... Error: Order could not be patched
receive::err postrobot_method https://www.sandbox.paypal.com Error: Order could not be patched
respond::err onShippingChange() https://www.sandbox.paypal.com Error: Order could not be patched
receive::err postrobot_method https://www.dev...... Error: Order could not be patched
respond::err onShippingChange() https://www.sandbox.paypal.com Error: Order could not be patched
Here is the onShippingChange section from our code:
$PayPalButonSDK = 'https://www.paypal.com/sdk/js?client-id='.$clientId.'¤cy=EUR&enable-funding=card,paylater,sofo...';
onShippingChange: function(data, actions) {
return fetch('cange_versand_PayPalButton.php', {
method: 'post',
headers: {'content-type': 'application/json'},
body: JSON.stringify(data)
}).then(response => response.json())
.then(data => {
if(data.antwort === "außerhalbEU" || data.antwort === "CoronaSperre"){
//Zahlung ablehnen
console.log("Zahlung ablehnen wg außerhalbEU oder CoronaSperre ");
}else{
var newVal = data.zuZahlen;
var newinvoice_id = data.order_id;
var newCurrency = data.currency;
var newOrderlines = '['+data.orderlines+']';
var newDiscount = data.discount;
console.log("newVal: "+newVal+" | newinvoice_id: "+newinvoice_id+" | newCurrency: "+newCurrency+" newOrdelines: "+newOrderlines+ " | PPshipCountryCode: "+data.PPshipCountryCode+ " | discount: "+data.discount);
return actions.order.patch([
{
op: "replace",
path: "/purchase_units/@reference_id=='default'",
value: {
amount: {
currency_code: newCurrency,
value: newVal,
breakdown: {
item_total: {
currency_code: newCurrency,
value: newVal + newDiscount
},
discount:{
currency_code: newCurrency,
value: newDiscount
}
}
},
invoice_id : newinvoice_id,
items: JSON.parse(newOrderlines)
}
}
]);
}
})
},
The data passed in the "actions.order.patch" seems plausible... here is the console.log of this data from a test order:
newVal: 21.95 | newinvoice_id: 22351037 | newCurrency: EUR newOrdelines: [{"name": "Hydra - Hydra Plus + Perfect Glow","unit_amount": {"value": "16", "currency_code": "EUR"},"quantity": "1","sku": "BAB401429"},{"name": "Frachtkosten | Shipping costs","unit_amount":{"value": "5.95", "currency_code": "EUR"},"quantity": "1"}] | PPshipCountryCode: DE | discount: 0
If we remove the "return actions.order.patch([ ])" part from the code, then everything works fine!
We would appreciate any help that could solve the problem!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi digide
I am experiencing the exact same problem. Started several weeks ago - no code changes on my end. I raised a case with PayPal support on 12 April, was told that my payload looked correct (well, it hadn't changed so it should be) and that he was passing on to the API team to look at. I've asked for an update and got told "no update, sadly". I'm still awaiting a reply/resolution to this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am also getting this, which is a bit of a nightmare to be honest. Do you get the same message in Live version, or just in Sandbox?
Seems to make no sense as with the latest update we have no access to change addresses etc to even find the issue!
Thanks for your time.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Couldn't receive International payment in PayPal Payments Standard
- Sandbox account collect billing and shipping address in Sandbox Environment
- Enabled billing address for sandbox in Sandbox Environment
- How to validate data existence on PayPal side in REST APIs
- Error payment in PayPal Payments Standard