You are here

function uc_recurring_hosted_paypal_wpp_suspension_log in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 modules/uc_recurring_hosted/uc_recurring_hosted.module \uc_recurring_hosted_paypal_wpp_suspension_log()

Suspends a user's profile due to failed payment.

Parameters

unknown_type $fee:

unknown_type $ipn:

Return value

unknown_type

1 call to uc_recurring_hosted_paypal_wpp_suspension_log()
uc_recurring_hosted_paypal_ipn in modules/uc_recurring_hosted/uc_recurring_hosted.paypal_ipn.inc
Handle IPN callbacks for PayPal recurring payments

File

modules/uc_recurring_hosted/uc_recurring_hosted.module, line 1250
Provides hosted gateway specific code for recurring payments, specifically Authorize.net ARB and Paypal WPS

Code

function uc_recurring_hosted_paypal_wpp_suspension_log($fee, $ipn) {
  $profile = uc_recurring_hosted_paypal_wpp_get_profile($fee->rfid);
  if ($profile['LASTPAYMENTDATE']) {
    $date = date('m/d/Y H:i:s', strtotime($profile['LASTPAYMENTDATE']));
  }
  else {
    $date = 'N/A';
  }
  $message = t('<b>PayPal Recurring Profile Suspended</b><br /><b>Last Successful Payment Date: </b>@date<br /><b>Recurring Profile ID: </b>@profile_id', array(
    '@date' => $date,
    '@profile_id' => $ipn->recurring_payment_id,
  ));
  uc_order_comment_save($fee->order_id, 0, $message, 'admin');
  $fee->status = 3;
  uc_recurring_fee_user_save($fee);
}