Prev | Current Page 744 | Next

Emilian Balanescu and Cristian Darie

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

', 20400);
$request = new DataCashRequest(DATACASH_URL);
$request->MakeXmlFulFill(DATACASH_CLIENT, DATACASH_PASSWORD,
$processor->mOrderInfo['auth_code'],
$processor->mOrderInfo['reference']);
$responseXml = $request->GetResponse();
$xml = simplexml_load_string($responseXml);
if ($xml->status == 1)
{
// Audit
$processor->CreateAudit(
'Funds deducted from customer credit card account.', 20402);
// Update order status
$processor->UpdateOrderStatus(5);
// Continue processing
$processor->mContinueNow = true;
}
else
{
// Audit
$processor->CreateAudit('Could not deduct funds from credit card.',
20403);
throw new Exception('Credit card take payment failed for order ' .
$processor->mOrderInfo['order_id'] . "\n\n" .
'Data exchanged:' . "\n" .
$request->GetResponse() . "\n" . $responseXml);
}
// Audit
$processor->CreateAudit('PsTakePayment finished.', 20401);
}
}
?>
CHAPTER 20 ?–  PROCESSING CREDIT CARD TRANSACTIONS 640
3. Add a reference to the business/datacash_request.php file in index.php as highlighted:
require_once BUSINESS_DIR . 'ps_check_funds.php';
require_once BUSINESS_DIR . 'ps_check_stock.php';
require_once BUSINESS_DIR . 'datacash_request.php';
4. Add a reference to the business/datacash_request.php file in admin.php as highlighted:
require_once BUSINESS_DIR . 'ps_ship_ok.php';
require_once BUSINESS_DIR . 'ps_final_notification.


Pages:
732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756
Aqua fotografia ślubna Vanessa Amorosi opisy gg kamera termowizyjna