def parse(response)
        JSON.parse response
      rescue JSON::ParserError
        msg = 'Invalid JSON response received from Datatrans. Please contact them for support if you continue to receive this message.'
        msg += "  (The raw response returned by the API was #{response.inspect})"