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:
Holger Hans Peter Freyther 2011-11-10 17:27:44 +00:00 committed by Holger Hans Peter Freyther
parent dec84157ba
commit 4883afb265
1 changed files with 6 additions and 0 deletions

View File

@ -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