简体   繁体   中英

Braintree payment method create issue in node.js

I am trying to create Braintree Payment Method.

But I need to store CVV, expirationDate but official document page showing these two are deprecated.

Right now I am using code for creating Braintree Payment Method.

Example :

gateway.paymentMethod.create({
  customerId: req.session.passport.user.braintree_customer_id,
  paymentMethodNonce: "fake-valid-mastercard-nonce",
  cardholder_name: req.session.passport.user.first_name+" "+req.session.passport.user.last_name,
  billingAddress: {
    streetAddress: req.body.address1,
    locality:req.body.city,
    region:req.body.state,
    postalCode:req.body.zip
  },

  options: {
    verifyCard: true,
  }
}, function (err, result) {
  if(err){console.log(err);return false;}
  callback(false,result)
}); 

But I need to store CC, CVV, Exp Date, Cardholder name, etc.

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support .

You're using a payment method nonce to send the credit card details, which includes the number, cvv and expiration details. Cardholder name is not deprecated, so you can submit that separately from the nonce.

Note: CVVs are used for the initial transaction, but are not stored in the vault. In fact, there is no way to store the CVV in the vault.

Yes i was fixed issue using

paymentMethodNonce : nonce-from-the-client

Example Code:

    gateway.paymentMethod.create({
              customerId:'xxx',
               paymentMethodNonce: 'nonce-from-the-client',
               cardholder_name:'xxx' 
-----------------------------------------------------------

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM