【发布时间】:2016-03-21 06:36:05
【问题描述】:
我在 NodeJS 中创建了一个简单的测试脚本,用于使用 Braintree SDK 创建事务。但是,每当我尝试使用虚假的失败随机数时,它都会成功。我确定我在这里遗漏了一些简单的东西,但我不知道它是什么。
gateway.transaction.sale({
amount: 10,
paymentMethodNonce: "fake-processor-declined-mastercard-nonce",
options: {
submitForSettlement: true
}
}, function(err, res) {
console.log(JSON.stringify(res, null, "\t"));
});
【问题讨论】: