lib/active_merchant/billing/gateways/pay_junction.rb in activemerchant-1.43.3 vs lib/active_merchant/billing/gateways/pay_junction.rb in activemerchant-1.44.0
- old
+ new
@@ -209,11 +209,11 @@
commit('CREDIT', parameters)
end
def credit(money, authorization, options = {})
- deprecated CREDIT_DEPRECATION_MESSAGE
+ ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
refund(money, authorization, options)
end
# Cancel a transaction that has been charged but has not yet made it
# through the batch process.
@@ -237,10 +237,12 @@
#
# The optional parameter :starting_at takes a date or time argument or a string in
# YYYYMMDD format and can be used to specify when the first charge will be made.
# If omitted the first charge will be immediate.
def recurring(money, payment_source, options = {})
+ ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
+
requires!(options, [:periodicity, :monthly, :weekly, :daily], :payments)
periodic_type = case options[:periodicity]
when :monthly
'month'
@@ -377,20 +379,8 @@
key, val = pair.split('=')
response[key[3..-1].to_sym] = val ? normalize(val) : nil
end
response
end
-
- # Make a ruby type out of the response string
- def normalize(field)
- case field
- when "true" then true
- when "false" then false
- when "" then nil
- when "null" then nil
- else field
- end
- end
-
end
end
end