address: Set a dummy zipcode if none was returned from paypal
This is an attempt to fix a case where paypal does not provide any zipcode back to us and then validation is failing. It is difficult to test misconduct of paypal.
This commit is contained in:
parent
bab9d6b8a7
commit
d2db33ad1d
|
@ -100,6 +100,11 @@ module Spree
|
||||||
order_ship_address.state_name = "N/A"
|
order_ship_address.state_name = "N/A"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Paypal returned an address without zipcode
|
||||||
|
if order_ship_address.zipcode.nil?
|
||||||
|
order_ship_address.zipcode = "N/A"
|
||||||
|
end
|
||||||
|
|
||||||
order_ship_address.save!
|
order_ship_address.save!
|
||||||
|
|
||||||
@order.sysmocom_paypal_ship_address = order_ship_address
|
@order.sysmocom_paypal_ship_address = order_ship_address
|
||||||
|
|
Loading…
Reference in New Issue