Tag: 支付处理

即使在braintree中出错,result.credit_card_verification仍返回nil

我正在使用braintree进行支付处理,我正在尝试使用Ruby从Braintree获取处理器响应代码 。 这是我的代码: verification = result.credit_card_verification response_code = verification.try(:processor_response_code) 即使出现错误,我也会将validation结果为零。 还有其他东西可以获得处理器响应代码吗? 我从这里得到了这个代码 这是我的result.erros: :errors: !ruby/object:Braintree::Errors errors: !ruby/object:Braintree::ValidationErrorCollection errors: [] nested: :customer: !ruby/object:Braintree::ValidationErrorCollection errors: [] nested: :credit_card: !ruby/object:Braintree::ValidationErrorCollection errors: – !ruby/object:Braintree::ValidationError code: ‘81707’ attribute: cvv message: CVV must be 4 digits for American Express and 3 digits for other card types. – !ruby/object:Braintree::ValidationError code: ‘81713’ attribute: […]