lib/active_merchant/billing/gateways/vanco.rb in activemerchant-1.54.0 vs lib/active_merchant/billing/gateways/vanco.rb in activemerchant-1.55.0

- old
+ new

@@ -195,24 +195,29 @@ add_credit_card(doc, payment_method, options) end end def add_credit_card(doc, credit_card, options) - address = options[:billing_address] - doc.AccountNumber(credit_card.number) doc.CustomerName("#{credit_card.last_name}, #{credit_card.first_name}") doc.CardExpMonth(format(credit_card.month, :two_digits)) doc.CardExpYear(format(credit_card.year, :two_digits)) doc.CardCVV2(credit_card.verification_value) doc.CardBillingName(credit_card.name) + doc.AccountType("CC") + add_billing_address(doc, options) + end + + def add_billing_address(doc, options) + address = options[:billing_address] + return unless address + doc.CardBillingAddr1(address[:address1]) doc.CardBillingAddr2(address[:address2]) doc.CardBillingCity(address[:city]) doc.CardBillingState(address[:state]) doc.CardBillingZip(address[:zip]) doc.CardBillingCountryCode(address[:country]) - doc.AccountType("CC") end def add_echeck(doc, echeck) if echeck.account_type == "savings" doc.AccountType("S")