本文整理匯總了PHP中Braintree_Transaction::releaseFromEscrow方法的典型用法代碼示例。如果您正苦於以下問題:PHP Braintree_Transaction::releaseFromEscrow方法的具體用法?PHP Braintree_Transaction::releaseFromEscrow怎麽用?PHP Braintree_Transaction::releaseFromEscrow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Braintree_Transaction
的用法示例。
在下文中一共展示了Braintree_Transaction::releaseFromEscrow方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: print_r
print_r($result);
} else {
if ($_POST['_act'] == 'CreateTransEscrow') {
$result = Braintree_Transaction::sale(array('merchantAccountId' => $_POST["sub_merchant_id"], 'amount' => $_POST["amount"], 'paymentMethodNonce' => $_POST["payment_method_nonce"], 'serviceFeeAmount' => $_POST["serviceFeeAmount"], 'options' => array('holdInEscrow' => true)));
print_r($result);
$file = './data/trans_id.txt';
//[ADD Customer ID to text file]
$transID = $result->transaction->id . "\r\n";
// Write the contents to the file,
// using the FILE_APPEND flag to append the content to the end of the file
// and the LOCK_EX flag to prevent anyone else writing to the file at the same time
file_put_contents($file, $transID, FILE_APPEND | LOCK_EX);
print_r($result);
} else {
if ($_POST['_act'] == 'ReleaseTransEscrow') {
$result = Braintree_Transaction::releaseFromEscrow($_POST['trans_id']);
print_r($result);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
示例2: testCancelRelease_fromEscrow
function testCancelRelease_fromEscrow()
{
$transaction = $this->createEscrowedTransaction();
$result = Braintree_Transaction::releaseFromEscrow($transaction->id);
$result = Braintree_Transaction::cancelRelease($transaction->id);
$this->assertTrue($result->success);
$this->assertEquals(Braintree_Transaction::ESCROW_HELD, $result->transaction->escrowStatus);
}
示例3: releaseFromEscrow
public function releaseFromEscrow($transaction_id)
{
$result = Braintree_Transaction::releaseFromEscrow($transaction_id);
if ($result->success) {
return $result;
} else {
return array('success' => 0, 'errors' => $result->errors->deepAll());
}
}