ACME Order Sample Application © 2001, Eastwright Corp Release 1.0 Please go to www.eastwright.com/internet/aoladdons/ for latest releases 1. What is ACME Order? ACME Order is a sample application to use as a template to develop your own order forms and receipt scripts to use with Accounts Online. This is a set of template files and custom scripts to illustrate how all system components (order forms, Accounts Online engine, eCommerce Gateway module and receipt scripts) fits together. 2. How it works. The ordering process is as follows: A. Customer clicks Order Now link/button placed anywhere on your site (acmeorder.html is a sample of such page). B. Control is passed to Accounts Online, which brings up templates (payformex.html and payformnew.html) driven registration interface. From internal view point the goal of registration is to establish an account, which will be used to post invoices and receipts from credit card transactions. User id and password (required fields) may be used to access member areas (protected directories), which are automatically maintained by Accounts Online. Upon registration (or logging in for existing accounts) customer forwarded to payment form. C. Payment form generated by payform.pl script, which is being called by Accounts Online. The script parses account and product data and makes call to Accounts Online API in order to obtain html code for the form. In addition to transaction gateway specific parameters the form contains account id, password and product id - this info is being passed through transactions gateway. D. Upon submission of the payment form customer arrives to transaction server site, where credit card/e-check transaction occurs. After transaction completed gateway server will pass control back to Accounts Online site (the accview.pl script) preserving all application related parameters (account id, password, product id). E. Accounts Online posts invoice and receipt to proper account and calls on-receipt script (if defined for product purchased). F. The custom on-receipt script can perform any desired action (print receipt, initiate software download, provide setup instructions etc.) 3. Installation A. Make sure acmereceipt.pl and payform.pl files contain correct path to perl. Upload these files to your Accounts Online executables directory in ASCII mode. B. Upload acmeorder.html file to your Accounts Online executables directory. C. Upload payformnew.html and payformex.html files to your Accounts Online /tmpl directory, where is value of Base directory configuration variable (as per System Setup). D. Create products of invoice type with ids notebook, palmcase, palm. Specify full filesystem (not url!) path of acmereceipt.pl script in "Receipt relay script" for each product. E. Fill in "pin" field (System Setup->Plugins section), the value must match the one used to initialize $pin variable (payform.pl script). Default value is 777. F. Point your browser to acmeorder.html script and run ACME Order sample application. 4. Implementation notes. A. payform.pl script expects customarg1 input parameter to hold product id, customarg3 can be used to convey transaction amount (required for variable price products). B. prodid input is not used by templates to avoid posting invoices before transaction completed.