2016-11-09 96 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 [使用支付令牌】创建随机数吧? –