lib/active_merchant/billing/gateways/blue_snap.rb in activemerchant-1.121.0 vs lib/active_merchant/billing/gateways/blue_snap.rb in activemerchant-1.123.0
- old
+ new
@@ -384,11 +384,11 @@
doc.send('account-type', BANK_ACCOUNT_TYPE_MAPPING["#{check.account_holder_type}_#{check.account_type}"])
end
def parse(response)
return bad_authentication_response if response.code.to_i == 401
- return forbidden_response(response.body) if response.code.to_i == 403
+ return generic_error_response(response.body) if [403, 429].include?(response.code.to_i)
parsed = {}
doc = Nokogiri::XML(response.body)
doc.root.xpath('*').each do |node|
name = node.name.downcase
@@ -562,10 +562,10 @@
def bad_authentication_response
{ 'description' => 'Unable to authenticate. Please check your credentials.' }
end
- def forbidden_response(body)
+ def generic_error_response(body)
{ 'description' => body }
end
end
class PaymentMethodDetails