2016-11-09 99 views

回答

0

我認爲這取決於你是如何與布倫特裏集成。你使用他們的託管領域?投遞?

基本上,根據自己的文檔,你會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

+0

所以我們可以使用update()方法,以重新驗證,爲此,我們需要使用的付款方式令牌再次右鍵生成付款方式的隨機數? –

+0

根據文檔,是的。看起來CVV需要重新驗證,因此您需要在update調用中傳遞只包含CVV的隨機數。 – ThinkAboutIt

+0

我們也可以用這種方法https://developers.braintreepayments.com/reference/request/payment-method-nonce/create/php [使用支付令牌】創建隨機數吧? –