Пример #1
0
 /**
  * Processed if payment is successfully written, send a receipt to the customer
  * and notification to the admin
  * 
  * @see Payment_Extension::onAfterWrite()
  */
 public function onAfterPayment()
 {
     $this->Status = $this->getPaid() ? self::STATUS_PROCESSING : self::STATUS_PENDING;
     $this->PaymentStatus = $this->getPaid() ? 'Paid' : 'Unpaid';
     $this->write();
     ReceiptEmail::create($this->Member(), $this)->send();
     NotificationEmail::create($this->Member(), $this)->send();
     $this->extend('onAfterPayment');
 }