lib/active_merchant/billing/gateways/ct_payment.rb in activemerchant-1.114.0 vs lib/active_merchant/billing/gateways/ct_payment.rb in activemerchant-1.116.0
- old
+ new
@@ -24,16 +24,16 @@
'diners_club' => 'I',
'visa' => 'V',
'discover' => 'O'
}
- def initialize(options={})
+ def initialize(options = {})
requires!(options, :api_key, :company_number, :merchant_number)
super
end
- def purchase(money, payment, options={})
+ def purchase(money, payment, options = {})
requires!(options, :order_id)
post = {}
add_terminal_number(post, options)
add_money(post, money)
add_operator_id(post, options)
@@ -43,11 +43,11 @@
add_customer_data(post, options)
payment.is_a?(String) ? commit('purchaseWithToken', post) : commit('purchase', post)
end
- def authorize(money, payment, options={})
+ def authorize(money, payment, options = {})
requires!(options, :order_id)
post = {}
add_money(post, money)
add_terminal_number(post, options)
add_operator_id(post, options)
@@ -57,11 +57,11 @@
add_customer_data(post, options)
payment.is_a?(String) ? commit('preAuthorizationWithToken', post) : commit('preAuthorization', post)
end
- def capture(money, authorization, options={})
+ def capture(money, authorization, options = {})
requires!(options, :order_id)
post = {}
add_invoice(post, money, options)
add_money(post, money)
add_customer_data(post, options)
@@ -71,11 +71,11 @@
post[:OriginalInvoiceNumber] = invoice_number
commit('completion', post)
end
- def refund(money, authorization, options={})
+ def refund(money, authorization, options = {})
requires!(options, :order_id)
post = {}
add_invoice(post, money, options)
add_money(post, money)
add_customer_data(post, options)
@@ -84,11 +84,11 @@
post[:OriginalInvoiceNumber] = invoice_number
commit('refundWithoutCard', post)
end
- def credit(money, payment, options={})
+ def credit(money, payment, options = {})
requires!(options, :order_id)
post = {}
add_terminal_number(post, options)
add_money(post, money)
add_operator_id(post, options)
@@ -98,11 +98,11 @@
add_customer_data(post, options)
payment.is_a?(String) ? commit('refundWithToken', post) : commit('refund', post)
end
- def void(authorization, options={})
+ def void(authorization, options = {})
post = {}
post[:InputType] = 'I'
post[:LanguageCode] = 'E'
transaction_number, _, invoice_number = split_authorization(authorization)
post[:OriginalTransactionNumber] = transaction_number
@@ -111,11 +111,11 @@
add_customer_data(post, options)
commit('void', post)
end
- def verify(credit_card, options={})
+ def verify(credit_card, options = {})
requires!(options, :order_id)
post = {}
add_terminal_number(post, options)
add_operator_id(post, options)
add_invoice(post, 0, options)
@@ -124,11 +124,11 @@
add_customer_data(post, options)
commit('verifyAccount', post)
end
- def store(credit_card, options={})
+ def store(credit_card, options = {})
requires!(options, :email)
post = {
LanguageCode: 'E',
Name: credit_card.name.rjust(50, ' '),
Email: options[:email].rjust(240, ' ')
@@ -226,10 +226,10 @@
MultiResponse.run(true) do |r|
r.process { commit_raw(action, parameters) }
r.process {
split_auth = split_authorization(r.authorization)
auth = (action.include?('recur') ? split_auth[4] : split_auth[0])
- action.include?('recur') ? commit_raw('recur/ack', {ID: auth}) : commit_raw('ack', {TransactionNumber: auth})
+ action.include?('recur') ? commit_raw('recur/ack', { ID: auth }) : commit_raw('ack', { TransactionNumber: auth })
}
end
end
end