本文整理汇总了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());
}
}