2
如何在進行銷售交易之前重新驗證Vault中的付款方式[信用卡]。如何在Braintree銷售交易之前在Vault中重新驗證信用卡
注: CVV和AVS規則啓用。
方案是:
- 客戶布倫特裏跳馬跳馬中做與付款方式[信用卡]出售交易。
- 我想在出售交易前重新驗證信用卡,以確保信用卡未過期。
如何在進行銷售交易之前重新驗證Vault中的付款方式[信用卡]。如何在Braintree銷售交易之前在Vault中重新驗證信用卡
注: CVV和AVS規則啓用。
方案是:
我認爲這取決於你是如何與布倫特裏集成。你使用他們的託管領域?投遞?
基本上,根據自己的文檔,你會create a nonce that contains only the CVV您提示用戶。
braintree.setup('YOUR_CLIENT_TOKEN', 'custom', {
id: 'my-sample-form',
hostedFields: {
cvv: {
selector: '#cvv'
}
}
});
一旦你有一個隨機數,你可以將它傳遞給PaymentMethod.update()調用了適當的付款方式標記,並確保verify_card設置爲true。
result = braintree.PaymentMethod.update("the_payment_method_token", {
"payment_method_nonce": nonce_from_the_client,
"options": {
"verify_card": True,
}
})
找到在https://developers.braintreepayments.com/reference/request/payment-method/update/#card-verification
所以我們可以使用update()方法,以重新驗證,爲此,我們需要使用的付款方式令牌再次右鍵生成付款方式的隨機數? –
根據文檔,是的。看起來CVV需要重新驗證,因此您需要在update調用中傳遞只包含CVV的隨機數。 – ThinkAboutIt
我們也可以用這種方法https://developers.braintreepayments.com/reference/request/payment-method-nonce/create/php [使用支付令牌】創建隨機數吧? –