我需要担心这个脑力测试多购买错误吗? [英] is this braintree testing multi purchase error something I should worry about?
问题描述
我试图弄清楚如何用braintree进行测试,并且遇到了带宽错误.
response = ::Braintree::Customer.create(payment_method_nonce: Braintree::Test::Nonce::Transactable)
token = response.customer.credit_card.first.token
#so far so good
response = ::Braintree::Transaction.sale(payment_method_token: token, amount: "1.00")
#still good
response = ::Braintree::Transaction.sale(payment_method_token: token, amount: "1.00")
#response is failure
# => Braintree::ErrorResult ... status: "gateway_rejected"
所有发生的事情都不会暂停.
如果我稍等片刻,然后再次运行销售线,它将再次起作用.
这当然会导致测试脚本出现问题.我可以删除与BT的实际连接,但是对此我有些担心.我应该是吗?
我在Braintree工作.如果您还有其他问题,可以随时与我们的支持团队联系. >
您可以在交易状态页面上查看gateway_rejected
的含义. API文档:
网关被拒绝
由于AVS,CVV,重复或欺诈检查失败,网关拒绝了交易.
交易还具有网关拒绝原因,在这种情况下将为duplicate
.
您可以找到有关重复的更多信息在控制面板文档中检查设置:
配置重复交易检查
默认情况下,在沙盒环境和生产环境中,都使用30秒的窗口来启用重复事务检查.具有帐户管理员权限的用户可以更新或禁用这些设置.
- 登录控制面板
- 导航到设置>处理重复交易检查
- 单击编辑"以调整时间窗口,或单击启用/禁用"以打开/关闭该功能
I'm trying to figure out how to test with braintree, and I'm running into what feels like a bandwidth error.
response = ::Braintree::Customer.create(payment_method_nonce: Braintree::Test::Nonce::Transactable)
token = response.customer.credit_card.first.token
#so far so good
response = ::Braintree::Transaction.sale(payment_method_token: token, amount: "1.00")
#still good
response = ::Braintree::Transaction.sale(payment_method_token: token, amount: "1.00")
#response is failure
# => Braintree::ErrorResult ... status: "gateway_rejected"
All that takes place without a pause.
If I wait a bit and run the sale line again it works again..
This of course sets up a problem with test scripts. I can moc-out the actual connection to BT, but I'm slightly worried about this. Should I be?
I work at Braintree. If you have more questions, you can always get in touch with our support team.
You can see what gateway_rejected
means on the transaction statuses page of the API docs:
Gateway rejected
The gateway rejected the transaction because AVS, CVV, duplicate or fraud checks failed.
Transactions also have a gateway rejection reason, which in this case will be duplicate
.
You can find more information about duplicate checking settings in the control panel docs:
Configure duplicate transaction checking
Duplicate transaction checking is enabled by default with a 30-second window in both the sandbox and production environments. These settings can be updated or disabled by users with Account Admin privileges.
- Log into the Control Panel
- Navigate to Settings > Processing > Duplicate Transaction Checking
- Click Edit to adjust the time window or Enable/Disable to turn the feature on/off
这篇关于我需要担心这个脑力测试多购买错误吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!