paypal: Add hack to accept paypal from US and Germany...
we had to make the State mandantory for US customers using Paypal, but now for EU members we don't get a state and fail to save the order. Move it down as we might overwrite it
This commit is contained in:
parent
dec84157ba
commit
4883afb265
|
@ -94,6 +94,12 @@ module Spree
|
|||
else
|
||||
order_ship_address.state_name = ship_address["state"]
|
||||
end
|
||||
|
||||
# Paypal requires us to have a state for US and on some states it is empty
|
||||
if order_ship_address.state_name.nil? && order_ship_address.state.nil?
|
||||
order_ship_address.state_name = "N/A"
|
||||
end
|
||||
|
||||
order_ship_address.save!
|
||||
|
||||
@order.sysmocom_paypal_ship_address = order_ship_address
|
||||
|
|
Loading…
Reference in New Issue