cancel
Showing results for 
Search instead for 
Did you mean: 

Express Checkout: Reject if shipping country change

Member

Express Checkout: Reject if shipping country change

//Reject if shipping country change
onShippingChange: function(data, actions) {
if (data.shipping_address.country != '".$country."') {
alert(data.shipping_address.country);  // "undefined is shown"
return actions.reject();
}

return actions.resolve();
},

 

I've used the suggested script to avoid client input mismatch shipping address. However, the result is always "seller will not ship to the country". I use alert function to show the paypal data: data.shipping_address.country, but getting 'undefined' result.

 

Any suggestion?

Thanks in advance