【发布时间】:2014-09-03 11:48:11
【问题描述】:
我正在尝试在 php 中使用 Braintree 实现托管资金。我已经从here 下载了库。我的代码如下:-
require_once "../braintree/lib/Braintree.php";
Braintree_Configuration::environment("sandbox");
Braintree_Configuration::merchantId("was4zgn5x6vt99h");
Braintree_Configuration::publicKey("ydjrasdwyw9npkvnw4");
Braintree_Configuration::privateKey("f197ac5a66a1fsad37d3950890b2cbda9");
$result = Braintree_Transaction::sale(
array(
'amount' => "100.00",
'creditCard' => array(
'number' => "4111111111111111",
'expirationDate' => "12/2014",
),
'options' => array(
'submitForSettlement' => true,
'holdInEscrow' => true,
)
)
);
echo "<pre>";
print_r("\n message: " . $result->message);
它适用于直接付款。但它不适用于托管。请检查我的代码。
错误是:-
"message: Transaction could not be held in escrow."
我从here得到了代码
【问题讨论】:
-
看来,这不是你的代码错误。他们不能将此交易作为托管处理。
-
我不清楚你在说什么。请给我一些可以帮助我的链接..
-
如果这些是你真正的钥匙,你可能会想要改变它们......
-
谢谢@BradWerth,不,这些不是我真正的钥匙。请你给我一些关于braintree escrow的建议......
-
@Bik 你有想过吗?我也有同样的问题