From d9873ff63fb4076d9e0a63a6c744a5ef8048cf61 Mon Sep 17 00:00:00 2001 From: Josh Shupack Date: Sun, 15 Jul 2012 17:08:35 -0700 Subject: [PATCH] fixed bug where state not found is Paypal returns state abbr in lowercase Fixes #71 --- app/controllers/spree/checkout_controller_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/spree/checkout_controller_decorator.rb b/app/controllers/spree/checkout_controller_decorator.rb index 5858050..beca6bb 100644 --- a/app/controllers/spree/checkout_controller_decorator.rb +++ b/app/controllers/spree/checkout_controller_decorator.rb @@ -80,7 +80,7 @@ module Spree # phone is currently blanked in AM's PPX response lib :phone => @ppx_details.params["phone"] || "(not given)" - if (state = Spree::State.find_by_abbr(ship_address["state"])) + if (state = Spree::State.find_by_abbr(ship_address["state"].upcase)) order_ship_address.state = state else order_ship_address.state_name = ship_address["state"]