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


PHP PMProEmail::sendBillingFailureAdminEmail方法代码示例

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


在下文中一共展示了PMProEmail::sendBillingFailureAdminEmail方法的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->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);
     if (!empty($user->ID)) {
         do_action("pmpro_stripe_subscription_deleted", $user->ID);
         $pmproemail = new PMProEmail();
开发者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::sendBillingFailureAdminEmail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。