我正在测试Braintree沙箱(PHP),即使我使用假nonce,交易仍然显示有效
我有一个dropin前端和一个PHP后端
我的后端测试代码如下所示:
$amount = '12.00';
$nonce = 'fake-processor-declined-visa-nonce';
$result = Braintree_Transaction::sale(['amount' => $amount,
'paymentMethodNonce' => $nonce,
'options' => ['submitForSettlement' => true]
]);
$debug = get_object_vars($result);
print_r($debug);
结果
Array
(
[success] => 1
[transaction] => BraintreeTransaction Object
(
[_attributes:protected] => Array
(
[id] => 9bnyb32r
[status] => submitted_for_settlement
[type] => sale
[currencyIsoCode] => EUR
[amount] => 12.00
[merchantAccountId] => somenamehere
[subMerchantAccountId] =>
[masterMerchantAccountId] =>
[orderId] =>
[createdAt] => DateTime Object
我发现假冒的nouces是为了测试沙盒中的错误结果......或者我错过了什么
最后
以上就是活泼保温杯最近收集整理的关于php沙盒测试,php - Braintree沙盒测试(假nonce) - 堆栈内存溢出的全部内容,更多相关php沙盒测试,php内容请搜索靠谱客的其他文章。
发表评论 取消回复