私はbraintree +エスクロー資金をPHPで実装しています。Braintree + esrow資金提供
私はBraintree PHPコードを使用しています。
コードは完全に機能しており、私はbraintreeサンドボックスダッシュボードでトランザクションを見ることができます。
しかし、一歩前進しているエスクロー資金を統合したいと思っています。以下はコード例です。
require_once "braintree-php/lib/Braintree.php";
Braintree_Configuration::environment("sandbox");
Braintree_Configuration::merchantId("merchantID");
Braintree_Configuration::publicKey("public-key");
Braintree_Configuration::privateKey("private-key");
$result = Braintree_Transaction::sale(
[
'amount' => '100.00',
'merchantAccountId' => 'abc',
'creditCard' => [
'number' => '378282246310005',
'expirationDate' => '12/18'
],
'options' => [
'submitForSettlement' => true,
'holdInEscrow' => true,
],
'serviceFeeAmount' => "10.00"
]
);
if ($result->success) {
echo '<pre>';
print_r("success!: " . $result->transaction->id);
print_r("success!: " . $result->transaction->escrowStatus);
print_r($result->transaction->serviceFeeAmount);
$escow = Braintree_Transaction::holdInEscrow($result->transaction->id);
} else if ($result->transaction) {
print_r("Error processing transaction:");
print_r("\n code: " . $result->transaction->processorResponseCode);
print_r("\n text: " . $result->transaction->processorResponseText);
} else {
echo '<pre>';
print_r("Validation errors: \n");
print_r($result->errors->deepAll());
}
これは私に以下のエラーを与えます。
1) Service fee not supported on master merchant account.
2) Transaction could not be held in escrow.
米国の国を選択してサンドボックスアカウントを作成しました。どのようにbraintreeの支払い中にエスクロー資金調達を達成するためにどのような助けと私のコードで間違って何をしています。
下のリンクのコードからサブ商人を作成しました。
ありがとうございます...私はあなたの指示に従い、別のアカウントを作成しました。その時、私は同じ問題に直面しているそのアカウントから米国(あなたの事業所はどこにありますか?)として国を選択しました。参考までに、私はアメリカのサンドボックスアカウントからサブ商人を作成することもできます。私は間違っているのですか?あらかじめありがとうございます:) –
さらに詳しい情報があれば教えてください。 –
ありがとう@AshPatel。 [email protected]にメールを送って、より詳細な情報を得ることができますか?とても有難い。 – ThinkAboutIt