lib/active_merchant/billing/gateways/payflow.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/payflow.rb in activemerchant-1.87.0

- old
+ new

@@ -90,11 +90,11 @@ end def recurring_inquiry(profile_id, options = {}) ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE - request = build_recurring_request(:inquiry, nil, options.update( :profile_id => profile_id )) + request = build_recurring_request(:inquiry, nil, options.update(:profile_id => profile_id)) commit(request, options.merge(:request_type => :recurring)) end def express @express ||= PayflowExpressGateway.new(@options) @@ -141,11 +141,11 @@ xml.tag! 'DutyAmt', options[:dutyamt] unless options[:dutyamt].blank? xml.tag! 'DiscountAmt', options[:discountamt] unless options[:discountamt].blank? billing_address = options[:billing_address] || options[:address] add_address(xml, 'BillTo', billing_address, options) if billing_address - add_address(xml, 'ShipTo', options[:shipping_address],options) if options[:shipping_address] + add_address(xml, 'ShipTo', options[:shipping_address], options) if options[:shipping_address] xml.tag! 'TotalAmt', amount(money), 'Currency' => options[:currency] || currency(money) end xml.tag! 'Tender' do xml.tag! 'Card' do @@ -287,11 +287,11 @@ xml.tag! 'OptionalTrans', TRANSACTIONS[initial_tx[:type]] xml.tag! 'OptionalTransAmt', amount(initial_tx[:amount]) unless initial_tx[:amount].blank? end if action == :add - xml.tag! 'Start', format_rp_date(options[:starting_at] || Date.today + 1 ) + xml.tag! 'Start', format_rp_date(options[:starting_at] || Date.today + 1) else xml.tag! 'Start', format_rp_date(options[:starting_at]) unless options[:starting_at].nil? end xml.tag! 'EMail', options[:email] unless options[:email].nil? @@ -306,33 +306,33 @@ end if action != :add xml.tag! 'ProfileID', options[:profile_id] end if action == :inquiry - xml.tag! 'PaymentHistory', ( options[:history] ? 'Y' : 'N' ) + xml.tag! 'PaymentHistory', (options[:history] ? 'Y' : 'N') end end end end end def get_pay_period(options) requires!(options, [:periodicity, :bimonthly, :monthly, :biweekly, :weekly, :yearly, :daily, :semimonthly, :quadweekly, :quarterly, :semiyearly]) case options[:periodicity] - when :weekly then 'Weekly' - when :biweekly then 'Bi-weekly' - when :semimonthly then 'Semi-monthly' - when :quadweekly then 'Every four weeks' - when :monthly then 'Monthly' - when :quarterly then 'Quarterly' - when :semiyearly then 'Semi-yearly' - when :yearly then 'Yearly' + when :weekly then 'Weekly' + when :biweekly then 'Bi-weekly' + when :semimonthly then 'Semi-monthly' + when :quadweekly then 'Every four weeks' + when :monthly then 'Monthly' + when :quarterly then 'Quarterly' + when :semiyearly then 'Semi-yearly' + when :yearly then 'Yearly' end end def format_rp_date(time) case time - when Time, Date then time.strftime('%m%d%Y') + when Time, Date then time.strftime('%m%d%Y') else time.to_s end end