lib/active_merchant/billing/gateways/allied_wallet.rb in activemerchant-1.103.0 vs lib/active_merchant/billing/gateways/allied_wallet.rb in activemerchant-1.104.0
- old
+ new
@@ -139,11 +139,12 @@
def commit(action, post)
begin
raw_response = ssl_post(url(action), post.to_json, headers)
response = parse(raw_response)
rescue ResponseError => e
- raise unless(e.response.code.to_s =~ /4\d\d/)
+ raise unless e.response.code.to_s =~ /4\d\d/
+
response = parse(e.response.body)
end
succeeded = success_from(response['status'])
Response.new(
@@ -197,9 +198,8 @@
'Succeeded'
else
response['message'] || 'Unable to read error message'
end
end
-
end
end
end