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


PHP email::sendBookingConfirmation_noinvoice方法代码示例

本文整理汇总了PHP中email::sendBookingConfirmation_noinvoice方法的典型用法代码示例。如果您正苦于以下问题:PHP email::sendBookingConfirmation_noinvoice方法的具体用法?PHP email::sendBookingConfirmation_noinvoice怎么用?PHP email::sendBookingConfirmation_noinvoice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在email的用法示例。


在下文中一共展示了email::sendBookingConfirmation_noinvoice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: goProcessPayment

function goProcessPayment()
{
    $progroup = db::runQuery("select * from process_group where process_status = '4'", 0, 1);
    if ($progroup) {
        foreach ($progroup as $payment) {
            dlog("Charging: " . $payment['cc_num'], false, $ListgroupID);
            $groupID = db::esc($payment['ID']);
            $ListgroupID = db::esc($payment['processgroupID']);
            $dontInvoiceUser = db::esc($payment['dontInvoiceUser']);
            $addressToInvoice = db::esc($payment['addressToInvoice']);
            $campaignSetcode = $payment['campaign_code'];
            db::insertQuery("update process_group set process_status = '5' where ID = '{$groupID}'");
            if (!$campaignSetcode == "") {
                $campaignCode = campaignSetcode;
                $campaignDetails = getCampaignDetails($campaignCode);
                $sendManualInvoice = true;
            } else {
                $campaignCode = false;
                $campaignDetails = false;
                $sendManualInvoice = false;
            }
            $cost = "\$" . $payment['totalcost'];
            $courseCostTotal = $payment['totalcost'];
            if ($payment['payment_type'] == "offline") {
                db::insertQuery("update process_group set process_status = '6', payment_status = 'complete' where ID = '{$groupID}'");
            } else {
                if ($payment['payment_type'] == "payment-employer") {
                    db::insertQuery("update process_group set process_status = '6', payment_status = 'employer' where ID = '{$groupID}'");
                    $trainees = db::runquery("select * from process_trainee where processgroupID = '{$ListgroupID}'");
                    if ($trainees) {
                        foreach ($trainees as $trainee) {
                            $learnerID = $trainee['leanerID'];
                            $contactID = $trainee['contactID'];
                            $invoiceID = $trainee['invoiceID'];
                            $bookingID = $learnerID . "-" . $contactID;
                            $enrolVar = array('fname' => $trainee['firstname'], 'lname' => $trainee['lastname'], 'email' => $trainee['email'], 'address' => $trainee['address'], 'suburb' => $trainee['suburb'], 'state' => getStateFromPostcode($trainee['postcode']), 'postcode' => $trainee['postcode'], 'mobile' => $trainee['mobile'], 'workplace' => $trainee['workplace'], 'couponCompany' => $trainee['workplace']);
                            email::sendBookingConfirmation_noinvoice($bookingID, $courseInstanceID, $enrolVar, $addressToInvoice);
                        }
                    } else {
                    }
                } else {
                    db::insertQuery("update process_group set payment_status = 'preparing' where ID = '{$groupID}'");
                    //$courseCostTotal
                    //$courseCostTotal = $payment['totalcost'];
                    $courseInstanceID = $payment['eventID'];
                    $addressToInvoice = $payment['addressToInvoice'];
                    //dlog("Charging: ".$payment['cc_num'], false, $ListgroupID);
                    $cc_num = $payment['cc_num'];
                    $cc_month = $payment['cc_month'];
                    $cc_year = $payment['cc_year'];
                    $primContactID = $payment['primaryContactID'];
                    $groupInvoiceID = $payment['GroupInvoiceID'];
                    $amount = number_format($courseCostTotal, 2);
                    //var_dump($courseCostTotal." -- ".$amount);
                    //dlog("Charging: ".$cc_num, false, $ListgroupID);
                    $data = array('txnType' => '0', 'txnSource' => 23, 'amount' => (int) ($amount * 100), 'currency' => 'AUD', 'purchaseOrderNo' => time(), 'CreditCardInfo' => array('cardNumber' => $cc_num, 'expiryDate' => $cc_month . '/' . $cc_year));
                    $order_id = time();
                    dlog("Start NAB Trans ", false, $ListgroupID);
                    $trans = uc_nab_transact_charge($order_id, $amount, $data);
                    $txnID = $trans['data']['TxnID'][0];
                    ob_start();
                    var_dump($trans);
                    $NABTrans_dump = ob_get_clean();
                    dlog($NABTrans_dump, false, $ListgroupID);
                    //var_dump($trans);
                    dlog("Finish NAB Trans ", false, $ListgroupID);
                    if ($trans['success'] == '1' || $cc_num == "1234123443214321") {
                        $transVars = array('amount' => $courseCostTotal, 'ContactID' => $primContactID, 'invoiceID' => $groupInvoiceID, 'reference' => $txnID, 'description' => "TXN: " . $txnID);
                        $extrans = axcelerate_transact($transVars);
                        ob_start();
                        echo "Axcelerate Transact\n";
                        var_dump($extrans);
                        echo "\n\nvars:\n\n";
                        var_dump($transVars);
                        $extrans_dump = ob_get_clean();
                        //dlog($extrans_dump, false, $ListgroupID);
                        $enrolmentReturn = array('success' => true, 'error_message' => '', 'txnid' => "" . $txnID . "", 'invoice' => $groupInvoiceID);
                        $dontInvoiceUser = false;
                        if ($sendManualInvoice) {
                            $trainees = db::runquery("select * from process_trainee where processgroupID = '{$ListgroupID}'");
                            if ($trainees) {
                                foreach ($trainees as $trainee) {
                                    $learnerID = $trainee['leanerID'];
                                    $contactID = $trainee['contactID'];
                                    $invoiceID = $trainee['invoiceID'];
                                    $learnerID = $trainee[''];
                                    $bookingID = "CA" . $enrollNow->LEARNERID . "-" . $contactID;
                                    $enrolVar = array('fname' => $trainee['firstname'], 'lname' => $trainee['lastname'], 'email' => $trainee['email'], 'address' => $trainee['address'], 'suburb' => $trainee['suburb'], 'state' => getStateFromPostcode($trainee['postcode']), 'postcode' => $trainee['postcode'], 'mobile' => $trainee['mobile'], 'workplace' => $trainee['workplace']);
                                    email::sendBookingConfirmation($bookingID, $courseInstanceID, $enrolVar, $trainee['email']);
                                }
                            } else {
                            }
                        }
                        db::insertQuery("update process_group set process_status = '6', payment_status = 'completed', cc_num = '#### #### #### ####', cc_ccv = '###', cc_month = '##', cc_year = '##' where ID = '{$groupID}'");
                    } else {
                        $errorMessage = db::esc($trans['message']);
                        if ($cc_num == "1234123443214321") {
                            db::insertQuery("update process_group set process_status = '6', payment_status = 'completed' where ID = '{$groupID}'");
                        } else {
                            //dlog("Failed:".$cc_num, false, $ListgroupID);
//.........这里部分代码省略.........
开发者ID:verbazend,项目名称:AWFA,代码行数:101,代码来源:functions.php


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