本文整理汇总了PHP中invoice::set_paid方法的典型用法代码示例。如果您正苦于以下问题:PHP invoice::set_paid方法的具体用法?PHP invoice::set_paid怎么用?PHP invoice::set_paid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类invoice
的用法示例。
在下文中一共展示了invoice::set_paid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: submit_paypal_post
function submit_paypal_post()
{
global $dbh, $postvar, $getvar, $instance;
echo "<form action=" . $this->paypal_url . " method='post' name='frm'>";
foreach ($this->fields as $a => $b) {
if ($a == "amount") {
if ($b == "0") {
$user_data = $dbh->select("users", array("id", "=", $_SESSION['cuser']));
$signup_date = date("m-d-Y", $user_data['signup']);
if ($signup_date == date("m-d-Y")) {
$noemail = "1";
}
invoice::set_paid($getvar['iid'], $noemail);
main::redirect("../client/?page=invoices");
exit;
}
}
echo "<input type='hidden' name='" . $a . "' value='" . $b . "'>";
}
echo '</form>
<script language="JavaScript">
document.frm.submit();
</script>';
exit;
}
示例2: paypal_class
}
if ($getvar['invoiceID']) {
require_once "../includes/paypal/paypal.class.php";
$paypal = new paypal_class();
if ($dbh->config("paypalmode") == "sandbox") {
$paypal->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
} else {
$paypal->paypal_url = 'https://www.paypal.com/cgi-bin/webscr';
}
if ($paypal->validate_ipn()) {
$user_data = $dbh->select("users", array("id", "=", $_SESSION['cuser']));
$signup_date = date("m-d-Y", $user_data['signup']);
if ($signup_date == date("m-d-Y")) {
$noemail = "1";
}
invoice::set_paid($getvar['invoiceID'], $noemail);
main::errors("Your invoice has been paid!");
} else {
main::errors("Your invoice hasn't been paid!");
}
}
} elseif ($_SESSION['clogged']) {
if (!$getvar['page']) {
$getvar['page'] = "home";
} elseif ($getvar['page'] == "logout") {
session_destroy();
main::redirect("./");
}
if (!$dbh->config("cenabled")) {
define("SUB", "Disabled");
define("INFO", SUB);