Prev | Current Page 702 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

', 20001);
}
The GetMailBody() method is used to build a message body to send to the customer. The
text uses customer and order data but follows a generally accepted e-commerce e-mail format.
Continue by adding this method to the PsInitialNotification class:
private function GetMailBody()
{
$body = 'Thank you for your order! ' .
'The products you have ordered are as follows:';
$body.= "\n\n";
$body.= $this->_mProcessor->GetOrderAsString(false);
$body.= "\n\n";
$body.= 'Your order will be shipped to:';
$body.= "\n\n";
$body.= $this->_mProcessor->GetCustomerAddressAsString();
$body.= "\n\n";
$body.= 'Order reference number: ';
$body.= $this->_mProcessor->mOrderInfo['order_id'];
$body.= "\n\n";
$body.= 'You will receive a confirmation e-mail when this order ' .
'has been dispatched. Thank you for shopping at ' .
STORE_NAME . '!';
return $body;
}
}
?>
When this pipeline stage finishes, processing moves straight on to PsCheckFunds.
PsCheckFunds
This pipeline stage is responsible for making sure that the customer has the required funds
available on a credit card. For now, we??™ll provide a dummy implementation of this and just
assume that these funds are available. We??™ll implement the real functionality in the next
chapter, which deals with credit card transactions.
CHAPTER 19 ?–  IMPLEMENTING THE ORDER PIPELINE: PART 2 595
Add the following code to a new file in the business folder named ps_check_funds.


Pages:
690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714
Rowy noclegi tatralandia hotele świnoujście noclegi Namioty Mazury i interesująca cena South park