Beginning PHP and Postgre SQL E-Commerce From Novice to Professional phần 9

Phần đường ống này là đáng kể tương tự như PsCheckStock, nó sẽ gửi một email cho nhà cung cấp và dừng lại các đường ống dẫn cho đến khi các nhà cung cấp đã khẳng định rằng chứng khoán đã được chuyển giao. Lần này bạn không cần phải thông tin khách hàng, tuy nhiên, | CHAPTER 14 IIMPLEMENTING THE ORDER PIPELINE PART II 483 Audit processor- CreateAudit Funds deducted from customer credit card account. 20402 Update order status processor- UpdateOrderStatus 5 Continue processing processor- mContinueNow true Audit processor- CreateAudit PsTakePayment finished. 20401 When this pipeline stage finishes processing moves straight on to PsShipGoods. PsShipGoods This pipeline section is remarkably similar to PsCheckStock as it sends an email to the supplier and stops the pipeline until the supplier has confirmed that stock has shipped. This time you do need customer information however because the supplier needs to know where to ship the order Add the following code to a new file in the business folder named php class PsShipGoods implements IPipelineSection private _mProcessor public function Process processor Set processor reference this- _mProcessor processor Audit processor- CreateAudit PsShipGoods started. 20500 Send mail to supplier processor- MailSupplier HatShop ship goods. this- GetMailBody Audit processor- CreateAudit Ship goods e-mail sent to supplier. 20502 Update order status processor- UpdateOrderStatus 6 484 CHAPTER 14 IIMPLEMENTING THE ORDER PIPELINE PART II Audit processor- CreateAudit PsShipGoods finished. 20501 As before a private method called GetMailBody is used to build the message body for the email sent to the supplier private function GetMailBody body Payment has been received for the following goods body. n n body. this- _mProcessor- GetOrderAsString false body. n n body. Please ship to body. n n body. this- _mProcessor- GetCustomerAddressAsString body. n n body. When goods have been shipped please confirm via . http body. n n body. Order reference number body. this- _mProcessor- mOrderInfo order_id return body When this pipeline stage finishes processing pauses. Later when the supplier confirms that the order has been shipped processing moves on to PsShipOk. PsShipOk .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
241    112    4    29-06-2024
80    290    1    29-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.