当前位置: 首页>>代码示例>>PHP>>正文


PHP invoice::set_paid方法代码示例

本文整理汇总了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;
    }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:25,代码来源:paypal.class.php

示例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);
开发者ID:cozylife,项目名称:tht-reworked,代码行数:31,代码来源:index.php


注:本文中的invoice::set_paid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。