lib/active_merchant/billing/gateways/pay_junction.rb in activemerchant-1.101.0 vs lib/active_merchant/billing/gateways/pay_junction.rb in activemerchant-1.102.0
- old
+ new
@@ -95,11 +95,11 @@
# dc_notes :description in options for transaction method
#
# See example use above for address AVS fields
# See #recurring for periodic transaction fields
class PayJunctionGateway < Gateway
- API_VERSION = '1.2'
+ API_VERSION = '1.2'
class_attribute :test_url, :live_url
self.test_url = 'https://www.payjunctionlabs.com/quick_link'
self.live_url = 'https://payjunction.com/quick_link'
@@ -241,18 +241,19 @@
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'
- when :weekly
- 'week'
- when :daily
- 'day'
- end
+ periodic_type =
+ case options[:periodicity]
+ when :monthly
+ 'month'
+ when :weekly
+ 'week'
+ when :daily
+ 'day'
+ end
if options[:starting_at].nil?
start_date = Time.now.strftime('%Y-%m-%d')
elsif options[:starting_at].is_a?(String)
sa = options[:starting_at]
@@ -316,10 +317,10 @@
# add address fields if present
def add_address(params, options)
address = options[:billing_address] || options[:address]
if address
- params[:address] = address[:address1] unless address[:address1].blank?
+ params[:address] = address[:address1] unless address[:address1].blank?
params[:city] = address[:city] unless address[:city].blank?
params[:state] = address[:state] unless address[:state].blank?
params[:zipcode] = address[:zip] unless address[:zip].blank?
params[:country] = address[:country] unless address[:country].blank?
end