lib/active_merchant/billing/gateways/cashnet.rb in activemerchant-1.101.0 vs lib/active_merchant/billing/gateways/cashnet.rb in activemerchant-1.102.0

- old
+ new

@@ -47,11 +47,11 @@ commit('SALE', money, post) end def refund(money, identification, options = {}) post = {} - post[:origtx] = identification + post[:origtx] = identification add_invoice(post, options) add_customer_data(post, options) commit('REFUND', money, post) end @@ -105,12 +105,12 @@ post[:fname] = creditcard.first_name post[:lname] = creditcard.last_name end def add_invoice(post, options) - post[:order_number] = options[:order_id] if options[:order_id].present? - post[:itemcode] = (options[:item_code] || @options[:default_item_code]) + post[:order_number] = options[:order_id] if options[:order_id].present? + post[:itemcode] = (options[:item_code] || @options[:default_item_code]) end def add_address(post, options) if address = (options[:shipping_address] || options[:billing_address] || options[:address]) post[:addr_g] = String(address[:address1]) + ',' + String(address[:address2]) @@ -119,11 +119,11 @@ post[:zip_g] = address[:zip] end end def add_customer_data(post, options) - post[:email_g] = options[:email] - post[:custcode] = options[:custcode] unless empty?(options[:custcode]) + post[:email_g] = options[:email] + post[:custcode] = options[:custcode] unless empty?(options[:custcode]) end def expdate(creditcard) year = format(creditcard.year, :two_digits) month = format(creditcard.month, :two_digits)