tailieunhanh - Beginning PHP and MySQL E-Commerce From Novice to Professional phần 10
Bản quyền © 2005 bởi Wiley Publishing, Inc, Indianapolis, Indiana Được đăng bởi Wiley Publishing, Inc, Indianapolis, Indiana đã công bố đồng thời tại Canada là một phần của ấn phẩm này có thể được sao chép, lưu trữ trong hệ thống phục hồi | Simpo PDF Merge and Split Unregistered Version - http CHAPTER 20 PROCESSING CREDIT CARD TRANSACTIONS 637 Perform a cURL session result curl_exec ch Close a cURL session curl_close ch Return the response return result The file acts like this When we load it in the browser the script makes a preauthentication request and a fulfillment request and then saves the preauthentication request response and fulfillment XML data in the session session_start if empty _GET step require_once include require_once BUSINESS_DIR . request new DataCashRequest DATACASH_URL request- MakeXmlPre DATACASH_CLIENT DATACASH_PASSWORD 8880000 rand 0 10000 GBP 3528000000000007 11 09 request_xml request- GetRequest _SESSION pre_request request_xml response_xml request- GetResponse _SESSION pre_response response_xml xml simplexml_load_string response_xml request- MakeXmlFulfill DATACASH_CLIENT DATACASH_PASSWORD xml- merchantreference xml- datacash_reference response_xml request- GetResponse _SESSION fulfill_response response_xml The page will be loaded three times more because we have three frames that we want to fill with data frameset cols 33 33 33 frame src step 1 frame src step 2 frame src step 3 frameset Simpo PDF Merge and Split Unregistered Version - http 638 CHAPTER 20 PROCESSING CREDIT CARD TRANSACTIONS Depending on the step value we decide which of the previously saved-in-session XML data is displayed in the current frame. If the step value is 1 the prerequest XML code is displayed. If the value is 2 the preresponse XML code is displayed. If the step value is 3 the fulfill response XML is displayed. else header Content-type text xml switch _GET step case 1 print _SESSION pre_request break case 2 print _SESSION pre_response break case 3 print _SESSION fulfill_response break exit Integrating DataCash with TShirtShop Now that we .
đang nạp các trang xem trước