2017-03-04 46 views
0

我正在使用Braintree作为我的iOS应用程序的支付网关。
我创建了一个Node.js服务器来处理付款。
我想使用用户管理系统中使用的用户标识的客户ID创建客户。Braintree:使用沙箱模式在CVV验证中创建或更新客户时的授权错误

BraintreeGateway.customer.update(req.uid, { 
    paymentMethodNonce, 
    verifyCard: process.env.NODE_ENV === 'production' 
}, (err, result) => { 
    if (err) { 
    next(err); 
    } else { 
    if (result.success) { 
     req.customer = result.customer 
     console.info('Payment Method:', result.customer.paymentMethods[0]) 
     res.send({ 
     status: HttpStatus.OK, 
     message: 'Successfully updated!' 
     }) 
    } else { 
     next({ 
     error: 'Failed to update a payment method!', 
     result 
     }) 
    } 
    } 
}) 

这里req.uid是用户的唯一标识符。
在Braintree控制面板中未启用CVV验证设置的情况下运行良好。 Here
但启用CVV验证设置后,我得到authorizationError: Authorization Error这意味着无效的API密钥。 Here
我使用DropIn UI来输入信用卡并将paymentMethodNonce正确地传递到服务器。
当前测试的信用卡号码是:4242 4242 4242 4242 Exp:12/2019 CVV:123

这里有什么错误?它会在生产模式下工作吗? (Braintree会接受生产模式下的有效信用卡号码?)

回答

相关问题