Accounts Online



Accounts Online
User Management
Invoices & receipts
Custom Order Forms
Custom Fields
Protected Directories
Auto Accounts
API Functions
Handling Taxes
Shipping&Handling

We accept VISA and MasterCard



Using custom order forms you can easily integrate Accounts Online into your business process using custom order templates. In this mode Accounts Online scripts serve as a middleman between a form and your custom script, which handles the form. Template is an html page, which contains a form to submit new account data. Being submitted the form activates proper script from Accounts Online package, which registers new account (or validates an existing one), posts an invoice and adds a subscription if necessary, then it passes control to your custom script preserving all the form's fields. If Accounts Online is unable to create new account, it will reload template preserving field values and will display error message (e.g. missing required field, duplicate account id).

Here are the steps, required to configure custom form.

1. Create custom form template. The template is an html page, with one or more <form> tags. Here is a sample code for a form, used to subscribe a customer with existing account to product "wktrial".

<font color="red"><b>*ERRORMESSAGE*</b></font><br><br>

<form method="POST" action="*CGIURL*">
<input type="hidden" name="cmd" value="subscribe">
<input type="hidden" name="prodid" value="wktrial">
<input type="hidden" name="template" value="subscribe.html">
<input type="hidden" name="confirmurl" value= "http://www.eastwright.com/internet/accnts/demo/welcome.pl"> Account ID: <input type="text" name="accid" size="10" value="*ACCID*"><br>
Password: <input type="password" name="passwd" size="25"><br>
Brand of your monitor: <input type="text" name="customarg1" size="25" value="*CUSTOMARG1*"><br>
Brand of your car: <input type="text" name="customarg2" size="25" value="*CUSTOMARG2*"><br>
<input type="submit" value="Subscribe Now!">
</form>

Notes:
1. The very first line is a placeholder for error messages, generated by Accounts Online (the *ERRORMESSAGE* tag will be replaced with a text of error message, if any).
2. *CGIURL* is a placeholder for script url
3. form field "cmd" is reserved for Accounts Online, you can use either "subscribe" to subscribe existing user (that is the one, which already has an account registered with Accounts Online), or "subscribenew" to subscribe new user
4. form field "prodid" is reserved for Accounts Online, it keeps a product id, the one you define using Product Manager (Admin Panel)
5. form field "template" is reserved for Accounts Online, it keeps filename of the custom form template.
6. form field "confirmurl" is reserved for Accounts Online, it keeps url of custom script to be activated after invoice posted to customer's account
7. form field "accid" is reserved for Accounts Online, use it to obtain customer id
8. form field "passwd" is reserved for Accounts Online, use it to obtain customer password
9. You can use any custom fields, their content will be passed to your custom script. But only values of text fields with names "customargX" (where X - is any single character) could be restored on custom form reloads.

The above form is being used to validate existing accounts. To create new account you should use "subscribenew" value for "cmd" field. This command will try to create new account using account data submitted. To initiate account fields please use the following fields:

NameDescriptionRequiredTag
accidUser ID (login)Yes*ACCID*
nameFirst nameNo*NAME*
lnameLast nameNo*LNAME*
streetStreet addressNo*STREET*
cityCityNo*CITY*
stateStateNo*STATE*
zipZIPNo*ZIP*
countryCountryNo*COUNTRY*
countryCountryNo*SELCOUNTRY*4
notesNotesNo*COUNTRY*
cctypeCredit card typeNo*CARDBOX*1
ccnumberCredit card numberNo*CCNUMBER*
ccvalidCredit card exp dateNo*CCVALID*
ccissueCredit card CVV/issue numberNo*CCISSUE*
ccnameName on cardNo*CCNAME*
ccstreetStreet address, as per bank statementNo*CCSTREET*
cccityCity, as per bank statementNo*CCCITY*
ccstateState, as per bank statementNo*CCSTATE*
cczipZIP, as per bank statementNo*CCZIP*
cccountryCountry, as per bank statementNo*CCCOUNTRY*
phonePhone numberNo*PHONE*
bizphoneBusiness phone numberNo*BIZPHONE*
faxFax numberNo*FAX*
emailEmail addressNo*EMAIL*
customN2custom fieldNo*CUSTOMN*2
gstSales tax codeNo*GST*, *GSTBOX*3
vatVAT codeNo*VAT*, *VATBOX*3
cuspasswdcustomer passwordYes 
cuspasswd1customer password (re-entered for verification)Yes 


Notes:
1 - the *CARDBOX* macro will generate complete html <select> tag using credit card types list as per System Setup form.
2 - N is a number in the range 0-9. The custom0-custom9 inputs convey values to be stored in customer account record,
3 - *GSTBOX* and *VATBOX* macros will generate complete html <input type=checkbox ...> tags
4 - the *SELCOUNTRY* macro will generate complete html <select> using countries list as defined via country editor (Shipping & Handling menu).

2. Store the form template at your basedir/tmpl directory, where basedir is Base Directory set via Admin Panel (System Setup command).

3. Use the following url to activate you custom script: url-to-accview.pl?cmd=loadtmpl&template=subscribe.html (we assume, that subscribe.html is the name of your template file)

Security considerations:

It is possible to call custom script (as per "confirmurl" field) directly by typing its url with parameters necessary right into address string of web browser. In order to prevent you site from such an abuse there is additional parameter "pincode" which generated by Accounts Online and passed to your custom script. The value of pincode produced by applying crypt Perl function to concatenation of accid and pin, as set by your system administrator using Admin Panel (System Setup menu). You need to hardcode this pin value into your custom script and each time it is invoked generate pincode and compare it against the one, you received as an input.

Please review the following sample files in your package for more details:
subscribe.html - sample custom form for subscription of existing user
regsubscribe.html - sample custom form for subscription of new user
welcome.pl - sample custom script


Copyright © 1999-2010 Rush Project Inc. All rights reserved.

Offshore software development by CGI Research.
jonhdoe@eastwright.com