lib/active_merchant/billing/gateways/culqi.rb in activemerchant-1.83.0 vs lib/active_merchant/billing/gateways/culqi.rb in activemerchant-1.84.0
- old
+ new
@@ -241,19 +241,17 @@
def url
test? ? test_url : live_url
end
def parse(body)
- begin
- JSON.parse(body)
- rescue JSON::ParserError
- message = 'Invalid JSON response received from CulqiGateway. Please contact CulqiGateway if you continue to receive this message.'
- message += "(The raw response returned by the API was #{body.inspect})"
- {
- 'status' => 'N',
- 'statusdescription' => message
- }
- end
+ JSON.parse(body)
+ rescue JSON::ParserError
+ message = 'Invalid JSON response received from CulqiGateway. Please contact CulqiGateway if you continue to receive this message.'
+ message += "(The raw response returned by the API was #{body.inspect})"
+ {
+ 'status' => 'N',
+ 'statusdescription' => message
+ }
end
def success_from(response)
response['status'] == 'Y'
end