lib/active_merchant/billing/gateways/bogus.rb in activemerchant-1.105.0 vs lib/active_merchant/billing/gateways/bogus.rb in activemerchant-1.106.0
- old
+ new
@@ -45,13 +45,13 @@
end
money = amount(money)
case normalize(paysource)
when /1$/
- Response.new(true, SUCCESS_MESSAGE, {:paid_amount => money}, :test => true)
+ Response.new(true, SUCCESS_MESSAGE, {paid_amount: money}, test: true)
when /2$/
- Response.new(false, FAILURE_MESSAGE, {:paid_amount => money, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
+ Response.new(false, FAILURE_MESSAGE, {paid_amount: money, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error])
else
raise Error, error_message(paysource)
end
end
@@ -59,56 +59,56 @@
money = amount(money)
case reference
when /1$/
raise Error, REFUND_ERROR_MESSAGE
when /2$/
- Response.new(false, FAILURE_MESSAGE, {:paid_amount => money, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
+ Response.new(false, FAILURE_MESSAGE, {paid_amount: money, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error])
else
- Response.new(true, SUCCESS_MESSAGE, {:paid_amount => money}, :test => true)
+ Response.new(true, SUCCESS_MESSAGE, {paid_amount: money}, test: true)
end
end
def capture(money, reference, options = {})
money = amount(money)
case reference
when /1$/
raise Error, CAPTURE_ERROR_MESSAGE
when /2$/
- Response.new(false, FAILURE_MESSAGE, {:paid_amount => money, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
+ Response.new(false, FAILURE_MESSAGE, {paid_amount: money, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error])
else
- Response.new(true, SUCCESS_MESSAGE, {:paid_amount => money}, :test => true)
+ Response.new(true, SUCCESS_MESSAGE, {paid_amount: money}, test: true)
end
end
def void(reference, options = {})
case reference
when /1$/
raise Error, VOID_ERROR_MESSAGE
when /2$/
- Response.new(false, FAILURE_MESSAGE, {:authorization => reference, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
+ Response.new(false, FAILURE_MESSAGE, {authorization: reference, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error])
else
- Response.new(true, SUCCESS_MESSAGE, {:authorization => reference}, :test => true)
+ Response.new(true, SUCCESS_MESSAGE, {authorization: reference}, test: true)
end
end
def store(paysource, options = {})
case normalize(paysource)
when /1$/
- Response.new(true, SUCCESS_MESSAGE, {:billingid => '1'}, :test => true, :authorization => AUTHORIZATION)
+ Response.new(true, SUCCESS_MESSAGE, {billingid: '1'}, test: true, authorization: AUTHORIZATION)
when /2$/
- Response.new(false, FAILURE_MESSAGE, {:billingid => nil, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
+ Response.new(false, FAILURE_MESSAGE, {billingid: nil, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error])
else
raise Error, error_message(paysource)
end
end
def unstore(reference, options = {})
case reference
when /1$/
- Response.new(true, SUCCESS_MESSAGE, {}, :test => true)
+ Response.new(true, SUCCESS_MESSAGE, {}, test: true)
when /2$/
- Response.new(false, FAILURE_MESSAGE, {:error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
+ Response.new(false, FAILURE_MESSAGE, {error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error])
else
raise Error, UNSTORE_ERROR_MESSAGE
end
end
@@ -116,48 +116,48 @@
def authorize_emv(money, paysource, options = {})
money = amount(money)
case money
when /00$/
- Response.new(true, SUCCESS_MESSAGE, {:authorized_amount => money}, :test => true, :authorization => AUTHORIZATION, :emv_authorization => AUTHORIZATION_EMV_SUCCESS)
+ Response.new(true, SUCCESS_MESSAGE, {authorized_amount: money}, test: true, authorization: AUTHORIZATION, emv_authorization: AUTHORIZATION_EMV_SUCCESS)
when /05$/
- Response.new(false, FAILURE_MESSAGE, {:authorized_amount => money, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error], :emv_authorization => AUTHORIZATION_EMV_DECLINE)
+ Response.new(false, FAILURE_MESSAGE, {authorized_amount: money, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error], emv_authorization: AUTHORIZATION_EMV_DECLINE)
else
raise Error, error_message(paysource)
end
end
def authorize_swipe(money, paysource, options = {})
money = amount(money)
case normalize(paysource)
when /1$/, AUTHORIZATION
- Response.new(true, SUCCESS_MESSAGE, {:authorized_amount => money}, :test => true, :authorization => AUTHORIZATION)
+ Response.new(true, SUCCESS_MESSAGE, {authorized_amount: money}, test: true, authorization: AUTHORIZATION)
when /2$/
- Response.new(false, FAILURE_MESSAGE, {:authorized_amount => money, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
+ Response.new(false, FAILURE_MESSAGE, {authorized_amount: money, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error])
else
raise Error, error_message(paysource)
end
end
def purchase_emv(money, paysource, options = {})
money = amount(money)
case money
when /00$/
- Response.new(true, SUCCESS_MESSAGE, {:paid_amount => money}, :test => true, :authorization => AUTHORIZATION, :emv_authorization => AUTHORIZATION_EMV_SUCCESS)
+ Response.new(true, SUCCESS_MESSAGE, {paid_amount: money}, test: true, authorization: AUTHORIZATION, emv_authorization: AUTHORIZATION_EMV_SUCCESS)
when /05$/
- Response.new(false, FAILURE_MESSAGE, {:paid_amount => money, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error], :emv_authorization => AUTHORIZATION_EMV_DECLINE)
+ Response.new(false, FAILURE_MESSAGE, {paid_amount: money, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error], emv_authorization: AUTHORIZATION_EMV_DECLINE)
else
raise Error, error_message(paysource)
end
end
def purchase_swipe(money, paysource, options = {})
money = amount(money)
case normalize(paysource)
when /1$/, AUTHORIZATION
- Response.new(true, SUCCESS_MESSAGE, {:paid_amount => money}, :test => true, :authorization => AUTHORIZATION)
+ Response.new(true, SUCCESS_MESSAGE, {paid_amount: money}, test: true, authorization: AUTHORIZATION)
when /2$/
- Response.new(false, FAILURE_MESSAGE, {:paid_amount => money, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
+ Response.new(false, FAILURE_MESSAGE, {paid_amount: money, error: FAILURE_MESSAGE }, test: true, error_code: STANDARD_ERROR_CODE[:processing_error])
else
raise Error, error_message(paysource)
end
end