lib/active_merchant/billing/gateways/payu_in.rb in activemerchant-1.50.0 vs lib/active_merchant/billing/gateways/payu_in.rb in activemerchant-1.51.0

- old
+ new

@@ -190,9 +190,13 @@ if response = top.delete("response") top.merge!(response) end top + rescue JSON::ParserError + { + "error" => "Invalid response received from the PayU API. (The raw response was `#{body}`)." + } end def commit(url, parameters) response = parse(ssl_post(url, post_data(parameters), "Accept-Encoding" => "identity"))