lib/active_merchant/billing/gateways/trust_commerce.rb in activemerchant-1.112.0 vs lib/active_merchant/billing/gateways/trust_commerce.rb in activemerchant-1.113.0
- old
+ new
@@ -149,11 +149,11 @@
# method simply checks to make sure funds are available for a transaction, and returns a transid that can be used later to
# postauthorize (capture) the funds.
def authorize(money, creditcard_or_billing_id, options = {})
parameters = {
- amount: amount(money),
+ amount: amount(money)
}
add_order_id(parameters, options)
add_aggregator(parameters, options)
add_customer_data(parameters, options)
@@ -166,11 +166,11 @@
# purchase() is a simple sale. This is one of the most common types of transactions, and is extremely simple. All that you need
# to process a purchase are an amount in cents or a money object and a creditcard object or billingid string.
def purchase(money, creditcard_or_billing_id, options = {})
parameters = {
- amount: amount(money),
+ amount: amount(money)
}
add_order_id(parameters, options)
add_aggregator(parameters, options)
add_customer_data(parameters, options)
@@ -186,11 +186,11 @@
# a postauthorization with TC, you need an amount in cents or a money object, and a TC transid.
def capture(money, authorization, options = {})
transaction_id, = split_authorization(authorization)
parameters = {
amount: amount(money),
- transid: transaction_id,
+ transid: transaction_id
}
add_aggregator(parameters, options)
add_custom_fields(parameters, options)
commit('postauth', parameters)
@@ -237,11 +237,11 @@
def void(authorization, options = {})
transaction_id, original_action = split_authorization(authorization)
action = (VOIDABLE_ACTIONS - ['preauth']).include?(original_action) ? 'void' : 'reversal'
parameters = {
- transid: transaction_id,
+ transid: transaction_id
}
add_aggregator(parameters, options)
add_custom_fields(parameters, options)
@@ -283,11 +283,11 @@
parameters = {
amount: amount(money),
cycle: cycle,
verify: options[:verify] || 'y',
billingid: options[:billingid] || nil,
- payments: options[:payments] || nil,
+ payments: options[:payments] || nil
}
add_creditcard(parameters, creditcard)
commit('store', parameters)
@@ -298,11 +298,11 @@
# to simply store the card in the DB, or you want TC to verify the data first.
def store(creditcard, options = {})
parameters = {
verify: options[:verify] || 'y',
- billingid: options[:billingid] || options[:billing_id] || nil,
+ billingid: options[:billingid] || options[:billing_id] || nil
}
add_creditcard(parameters, creditcard)
add_addresses(parameters, options)
add_custom_fields(parameters, options)
@@ -312,10 +312,10 @@
# To unstore a creditcard stored in Citadel using store() or recurring(), all that is required is the billing id. When you run
# unstore() the information will be removed and a Response object will be returned indicating the success of the action.
def unstore(identification, options = {})
parameters = {
- billingid: identification,
+ billingid: identification
}
add_custom_fields(parameters, options)
commit('unstore', parameters)