示例#1
0
 /**
  * Send payment e-mail
  * @param unknown_type $data
  */
 function sendPaymentEmail($data)
 {
     $orderTable = JTable::getInstance("Order", "JTable", array());
     $orderTable->load($data->order_id);
     $properties = $orderTable->getProperties(1);
     $order = JArrayHelper::toObject($properties, 'JObject');
     $order->details = $data;
     if ($order->amount == 0) {
         $order->details->processor_type = JText::_("LNG_NO_PAYMENT_INFO_REQUIRED");
     }
     $companiesTable = $this->getTable("Company");
     $company = $companiesTable->getCompany($order->company_id);
     $packageTable = $this->getTable("Package");
     $order->package = $packageTable->getPackage($order->package_id);
     if (!isset($company->email)) {
         return;
     }
     return EmailService::sendPaymentEmail($company, $order);
 }