lib/active_merchant/billing/gateways/smart_ps.rb in activemerchant-1.12.1 vs lib/active_merchant/billing/gateways/smart_ps.rb in activemerchant-1.13.0
- old
+ new
@@ -25,10 +25,11 @@
add_payment_source(post, creditcard,options)
add_address(post, options[:billing_address] || options[:address])
add_address(post, options[:shipping_address], "shipping")
add_customer_data(post, options)
add_currency(post, money, options)
+ add_taxes(post, options)
add_processor(post, options)
commit('auth', money, post)
end
def purchase(money, payment_source, options = {})
@@ -37,10 +38,11 @@
add_payment_source(post, payment_source, options)
add_address(post, options[:billing_address] || options[:address])
add_address(post, options[:shipping_address], "shipping")
add_customer_data(post, options)
add_currency(post, money, options)
+ add_taxes(post, options)
add_processor(post, options)
commit('sale', money, post)
end
def capture(money, authorization, options = {})
@@ -143,10 +145,14 @@
end
def add_currency(post, money, options)
post[:currency] = options[:currency] || currency(money)
end
-
+
+ def add_taxes(post, options)
+ post[:tax] = amount(options[:tax])
+ end
+
def add_processor(post, options)
post[:processor] = options[:processor] unless options[:processor].nil?
end
def add_invoice(post, options)