當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMProEmail::sendBillingFailureEmail方法代碼示例

本文整理匯總了PHP中PMProEmail::sendBillingFailureEmail方法的典型用法代碼示例。如果您正苦於以下問題:PHP PMProEmail::sendBillingFailureEmail方法的具體用法?PHP PMProEmail::sendBillingFailureEmail怎麽用?PHP PMProEmail::sendBillingFailureEmail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PMProEmail的用法示例。


在下文中一共展示了PMProEmail::sendBillingFailureEmail方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: pmpro_insFailedPayment

function pmpro_insFailedPayment($last_order)
{
    //hook to do other stuff when payments fail
    do_action("pmpro_subscription_payment_failed", $last_order);
    //create a blank order for the email
    $morder = new MemberOrder();
    $morder->user_id = $last_order->user_id;
    // Email the user and ask them to update their credit card information
    $pmproemail = new PMProEmail();
    $pmproemail->sendBillingFailureEmail($user, $morder);
    // Email admin so they are aware of the failure
    $pmproemail = new PMProEmail();
    $pmproemail->sendBillingFailureAdminEmail(get_bloginfo("admin_email"), $morder);
    inslog("Payment failed. Emails sent to " . $user->user_email . " and " . get_bloginfo("admin_email") . ".");
    return true;
}
開發者ID:Seravo,項目名稱:wp-paid-subscriptions,代碼行數:16,代碼來源:twocheckout-ins.php

示例2: hideCardNumber

         $morder->user_id = $user_id;
         $morder->billing->name = $old_order->billing->name;
         $morder->billing->street = $old_order->billing->street;
         $morder->billing->city = $old_order->billing->city;
         $morder->billing->state = $old_order->billing->state;
         $morder->billing->zip = $old_order->billing->zip;
         $morder->billing->country = $old_order->billing->country;
         $morder->billing->phone = $old_order->billing->phone;
         //get CC info that is on file
         $morder->cardtype = get_user_meta($user_id, "pmpro_CardType", true);
         $morder->accountnumber = hideCardNumber(get_user_meta($user_id, "pmpro_AccountNumber", true), false);
         $morder->expirationmonth = get_user_meta($user_id, "pmpro_ExpirationMonth", true);
         $morder->expirationyear = get_user_meta($user_id, "pmpro_ExpirationYear", true);
         // Email the user and ask them to update their credit card information
         $pmproemail = new PMProEmail();
         $pmproemail->sendBillingFailureEmail($user, $morder);
         // Email admin so they are aware of the failure
         $pmproemail = new PMProEmail();
         $pmproemail->sendBillingFailureAdminEmail(get_bloginfo("admin_email"), $morder);
         $logstr .= "Subscription payment failed on order ID #" . $old_order->id . ". Sent email to the member and site admin.";
         pmpro_stripeWebhookExit();
     } else {
         $logstr .= "Could not find the related subscription for event with ID #" . $event->id . ".";
         if (!empty($event->data->object->customer)) {
             $logstr .= " Customer ID #" . $event->data->object->customer . ".";
         }
         pmpro_stripeWebhookExit();
     }
 } elseif ($event->type == "customer.subscription.deleted") {
     //for one of our users? if they still have a membership, notify the admin
     $user = getUserFromCustomerEvent($event, "success", true);
開發者ID:nwmcinc,項目名稱:paid-memberships-pro,代碼行數:31,代碼來源:stripe-webhook.php

示例3: pmpro_ipnFailedPayment

function pmpro_ipnFailedPayment($last_order)
{
    //hook to do other stuff when payments fail
    do_action("pmpro_subscription_payment_failed", $last_order);
    //create a blank order for the email
    $morder = new MemberOrder();
    $morder->user_id = $last_order->user_id;
    //add billing information if appropriate
    if ($last_order->gateway == "paypal") {
        $morder->billing->name = $_POST['address_name'];
        $morder->billing->street = $_POST['address_street'];
        $morder->billing->city = $_POST['address_city '];
        $morder->billing->state = $_POST['address_state'];
        $morder->billing->zip = $_POST['address_zip'];
        $morder->billing->country = $_POST['address_country_code'];
        $morder->billing->phone = get_user_meta($morder->user_id, "pmpro_bphone", true);
        //get CC info that is on file
        $morder->cardtype = get_user_meta($morder->user_id, "pmpro_CardType", true);
        $morder->accountnumber = hideCardNumber(get_user_meta($morder->user_id, "pmpro_AccountNumber", true), false);
        $morder->expirationmonth = get_user_meta($morder->user_id, "pmpro_ExpirationMonth", true);
        $morder->expirationyear = get_user_meta($morder->user_id, "pmpro_ExpirationYear", true);
    }
    // Email the user and ask them to update their credit card information
    $pmproemail = new PMProEmail();
    $pmproemail->sendBillingFailureEmail($user, $morder);
    // Email admin so they are aware of the failure
    $pmproemail = new PMProEmail();
    $pmproemail->sendBillingFailureAdminEmail(get_bloginfo("admin_email"), $morder);
    ipnlog("Payment failed. Emails sent to " . $user->user_email . " and " . get_bloginfo("admin_email") . ".");
    return true;
}
開發者ID:srinivasulurao,項目名稱:transcharity,代碼行數:31,代碼來源:ipnhandler.php


注:本文中的PMProEmail::sendBillingFailureEmail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。