lib/active_merchant/billing/gateways/blue_pay.rb in activemerchant-1.100.0 vs lib/active_merchant/billing/gateways/blue_pay.rb in activemerchant-1.101.0
- old
+ new
@@ -349,13 +349,11 @@
def parse(body)
# The bp20api has max one value per form field.
response_fields = Hash[CGI::parse(body).map { |k, v| [k.upcase, v.first] }]
- if response_fields.include? 'REBILL_ID'
- return parse_recurring(response_fields)
- end
+ return parse_recurring(response_fields) if response_fields.include? 'REBILL_ID'
parsed = {}
response_fields.each do |k, v|
mapped_key = FIELD_MAP.include?(k) ? FIELD_MAP[k] : k
parsed[mapped_key] = v
@@ -512,12 +510,10 @@
].join('')
)
end
def handle_response(response)
- if ignore_http_status || (200...300).cover?(response.code.to_i)
- return response.body
- end
+ return response.body if ignore_http_status || (200...300).cover?(response.code.to_i)
raise ResponseError.new(response)
end
end
end
end