lib/active_merchant/billing/gateways/opp.rb in activemerchant-1.100.0 vs lib/active_merchant/billing/gateways/opp.rb in activemerchant-1.101.0
- old
+ new
@@ -123,13 +123,11 @@
super
end
def purchase(money, payment, options={})
# debit
- if payment.is_a?(String)
- options[:registrationId] = payment
- end
+ options[:registrationId] = payment if payment.is_a?(String)
execute_dbpa(options[:risk_workflow] ? 'PA.CP': 'DB',
money, payment, options)
end
def authorize(money, payment, options={})
@@ -309,20 +307,21 @@
def commit(post, authorization, options)
url = build_url(test? ? test_url : live_url, authorization, options)
add_authentication(post)
post = flatten_hash(post)
- response = begin
- parse(
- ssl_post(
- url,
- post.collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&'),
- 'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8'
+ response =
+ begin
+ parse(
+ ssl_post(
+ url,
+ post.collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&'),
+ 'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8'
+ )
)
- )
- rescue ResponseError => e
- parse(e.response.body)
- end
+ rescue ResponseError => e
+ parse(e.response.body)
+ end
success = success_from(response)
Response.new(
success,