lib/active_merchant/billing/gateways/balanced.rb in activemerchant-1.42.2 vs lib/active_merchant/billing/gateways/balanced.rb in activemerchant-1.42.3

- old
+ new

@@ -129,10 +129,11 @@ end post = {} post[:amount] = money post[:description] = options[:description] + post[:appears_on_statement_as] = options[:appears_on_statement_as] if options[:appears_on_statement_as] create_or_find_account(post, options) add_credit_card(post, credit_card, options) add_address(credit_card, options) @@ -166,10 +167,11 @@ end post = {} post[:amount] = money post[:description] = options[:description] + post[:appears_on_statement_as] = options[:appears_on_statement_as] if options[:appears_on_statement_as] create_or_find_account(post, options) add_credit_card(post, credit_card, options) add_address(credit_card, options) @@ -195,10 +197,11 @@ def capture(money, authorization, options = {}) post = {} post[:hold_uri] = authorization post[:amount] = money if money post[:description] = options[:description] if options[:description] + post[:appears_on_statement_as] = options[:appears_on_statement_as] if options[:appears_on_statement_as] post[:on_behalf_of_uri] = options[:on_behalf_of_uri] if options[:on_behalf_of_uri] create_transaction(:post, @debits_uri, post) rescue Error => ex failed_response(ex.response) @@ -211,10 +214,11 @@ # * <tt>authorization</tt> -- The uri of the authorization returned from # an `authorize` request. def void(authorization, options = {}) post = {} post[:is_void] = true + post[:appears_on_statement_as] = options[:appears_on_statement_as] if options[:appears_on_statement_as] create_transaction(:put, authorization, post) rescue Error => ex failed_response(ex.response) end @@ -244,10 +248,11 @@ requires!(debit_uri) post = {} post[:debit_uri] = debit_uri post[:amount] = amount post[:description] = options[:description] + post[:appears_on_statement_as] = options[:appears_on_statement_as] if options[:appears_on_statement_as] create_transaction(:post, @refunds_uri, post) rescue Error => ex failed_response(ex.response) end @@ -263,15 +268,15 @@ if credit_card.respond_to? :number card_uri = add_credit_card(post, credit_card, options) else card_uri = associate_card_to_account(account_uri, credit_card) end - + is_test = false if @marketplace_uri is_test = (@marketplace_uri.index("TEST") ? true : false) end - + Response.new(true, "Card stored", {}, :test => is_test, :authorization => [card_uri, account_uri].compact.join(';')) rescue Error => ex failed_response(ex.response) end