Prev | Current Page 703 | Next

Emilian Balanescu and Cristian Darie

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

php.
The code of the Process() method starts almost in the same way as PsInitialNotification:
class PsCheckFunds implements IPipelineSection
{
public function Process($processor)
{
// Audit
$processor->CreateAudit('PsCheckFunds started.', 20100);
Even though we aren??™t actually performing a check, set the authorization and reference
codes for the transaction to make sure that the code in OrderProcessor works properly:
/* Check customer funds assume they exist for now
set order authorization code and reference */
$processor->SetAuthCodeAndReference('DummyAuthCode',
'DummyReference');
We finish up with some auditing and the code required for continuation:
// Audit
$processor->CreateAudit('Funds available for purchase.', 20102);
// Update order status
$processor->UpdateOrderStatus(2);
// Continue processing
$processor->mContinueNow = true;
// Audit
$processor->CreateAudit('PsCheckFunds finished.', 20101);
}
}
?>
When this pipeline stage finishes, processing moves on to PsCheckStock.
PsCheckStock
This pipeline stage sends an e-mail instructing the supplier to check stock availability. Add the
following code to a new file in the business folder named ps_check_stock.php:
class PsCheckStock implements IPipelineSection
{
private $_mProcessor;
public function Process($processor)
{
CHAPTER 19 ?–  IMPLEMENTING THE ORDER PIPELINE: PART 2 596
// Set processor reference
$this->_mProcessor = $processor;
// Audit
$processor->CreateAudit('PsCheckStock started.


Pages:
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715
transport odpadów kredyt samochodowy lukas online loans no credit check installment South park Powiększanie ust kraków