如何在单笔 API 交易中验证信用卡和 post 销售?
How to verify credit card and post a sale in a single API transaction?
编辑:
tl;dr:你不能。
您必须创建付款方式才能对其进行验证。创建销售不会调用验证,即使全局启用验证也是如此。
原文:
我正在阅读有关 credit card verification, which apparently isn't done automatically during Braintree_Transaction::sale() 的信息,但我没有看到任何启用调用 sale() 验证的选项。
我真的必须(至少)实施两个单独的 API 交易来验证信用卡吗?
理想情况下,我想使用对 ::sale() 的单个调用来执行验证、授权和捕获。
我已经通过我的控制面板启用了验证,我正在使用测试信用卡号 4000111111111115,该卡应该被拒绝,但我使用它成功进行了交易。
我是否必须单独创建付款方式才能执行验证,即使我启用了全局验证?
完全披露:我在 Braintree 工作。如果您有任何其他问题,请随时联系 support。
到 test card verification results, please adjust the amount of your transaction. Because these cards are not linked to real accounts, Braintree cannot make the small authorization charges 是在生产中制作的,而 API 必须依赖测试交易的数量来决定预期的响应。
在生产环境中,卡验证是由创建支付方式触发的,而不是由交易触发的。要启用验证,如果验证因任何原因失败,enable it across all payment methods, or add the verifyCard
option to your PaymentMethod::Create
call. The response to PaymentMethod::Create
in either of these cases will contain a creditCardVerification
对象,允许您在调用 sale
之前停止交易。
编辑:
tl;dr:你不能。
您必须创建付款方式才能对其进行验证。创建销售不会调用验证,即使全局启用验证也是如此。
原文:
我正在阅读有关 credit card verification, which apparently isn't done automatically during Braintree_Transaction::sale() 的信息,但我没有看到任何启用调用 sale() 验证的选项。
我真的必须(至少)实施两个单独的 API 交易来验证信用卡吗?
理想情况下,我想使用对 ::sale() 的单个调用来执行验证、授权和捕获。
我已经通过我的控制面板启用了验证,我正在使用测试信用卡号 4000111111111115,该卡应该被拒绝,但我使用它成功进行了交易。
我是否必须单独创建付款方式才能执行验证,即使我启用了全局验证?
完全披露:我在 Braintree 工作。如果您有任何其他问题,请随时联系 support。
到 test card verification results, please adjust the amount of your transaction. Because these cards are not linked to real accounts, Braintree cannot make the small authorization charges 是在生产中制作的,而 API 必须依赖测试交易的数量来决定预期的响应。
在生产环境中,卡验证是由创建支付方式触发的,而不是由交易触发的。要启用验证,如果验证因任何原因失败,enable it across all payment methods, or add the verifyCard
option to your PaymentMethod::Create
call. The response to PaymentMethod::Create
in either of these cases will contain a creditCardVerification
对象,允许您在调用 sale
之前停止交易。