Permalink
Browse files

Adding billing state to the solon integration

  • Loading branch information...
1 parent ff5947b commit 74878a03621c55ab181e74bd207725f5ae468c76 @pyrat committed May 19, 2012
Showing with 2 additions and 1 deletion.
  1. +0 −1 lib/solon/customer_data.rb
  2. +2 −0 lib/solon/solon_gateway.rb
@@ -1,6 +1,5 @@
module Solon
class CustomerData
- # attr_accessor :address, :post_code, :name, :contact_number, :email
attr_accessor :surname, :firstnames, :address1, :address2, :city, :post_code, :country, :state, :phone, :email
def initialize(attrs = {})
@@ -353,6 +353,7 @@ def add_billing(options)
@post["BillingPostCode"] = options[:billing].post_code
@post["BillingCountry"] = options[:billing].country
@post["BillingPhone"] = options[:billing].phone
+ @post["BillingState"] = options[:billing].state if options[:billing].country == 'US'
end
end
@@ -367,6 +368,7 @@ def add_delivery(options)
@post["DeliveryPostCode"] = options[:delivery].post_code
@post["DeliveryCountry"] = options[:delivery].country
@post["DeliveryPhone"] = options[:delivery].phone
+ @post["DeliveryState"] = options[:delivery].state if options[:delivery].country == 'US'
end
end

0 comments on commit 74878a0

Please sign in to comment.