lib/active_merchant/billing/gateways/bpoint.rb in activemerchant-1.114.0 vs lib/active_merchant/billing/gateways/bpoint.rb in activemerchant-1.116.0
- old
+ new
@@ -10,68 +10,68 @@
self.supported_cardtypes = %i[visa master american_express diners_club]
self.homepage_url = 'https://www.bpoint.com.au/bpoint'
self.display_name = 'BPoint'
- def initialize(options={})
+ def initialize(options = {})
requires!(options, :username, :password, :merchant_number)
super
end
- def store(credit_card, options={})
+ def store(credit_card, options = {})
options[:crn1] ||= 'DEFAULT'
request_body = soap_request do |xml|
add_token(xml, credit_card, options)
end
commit(request_body)
end
- def purchase(amount, credit_card, options={})
+ def purchase(amount, credit_card, options = {})
request_body = soap_request do |xml|
process_payment(xml) do |payment_xml|
add_purchase(payment_xml, amount, credit_card, options)
end
end
commit(request_body)
end
- def authorize(amount, credit_card, options={})
+ def authorize(amount, credit_card, options = {})
request_body = soap_request do |xml|
process_payment(xml) do |payment_xml|
add_authorize(payment_xml, amount, credit_card, options)
end
end
commit(request_body)
end
- def capture(amount, authorization, options={})
+ def capture(amount, authorization, options = {})
request_body = soap_request do |xml|
process_payment(xml) do |payment_xml|
add_capture(payment_xml, amount, authorization, options)
end
end
commit(request_body)
end
- def refund(amount, authorization, options={})
+ def refund(amount, authorization, options = {})
request_body = soap_request do |xml|
process_payment(xml) do |payment_xml|
add_refund(payment_xml, amount, authorization, options)
end
end
commit(request_body)
end
- def void(authorization, options={})
+ def void(authorization, options = {})
request_body = soap_request do |xml|
process_payment(xml) do |payment_xml|
add_void(payment_xml, authorization, options)
end
end
commit(request_body)
end
- def verify(credit_card, options={})
+ def verify(credit_card, options = {})
MultiResponse.run(:use_first_response) do |r|
r.process { authorize(100, credit_card, options) }
r.process(:ignore_result) { void(r.authorization, options.merge(amount: 100)) }
end
end