What's
New
Doll
Makers
Room
Makers
Puzzle
Makers
Roiworld Stardoll Links
GirlSense - online dress up games for girls with fashion sense

Back to Free Shopping Cart

Line-by-Line Analysis


This script is transcribed from MyPaySystems PRO setup documentation (a pdf file), no online copy was easily available so I have mirrored this document here for easy reference

Table of contents
  1. INTRODUCTION
  2. BACKGROUND INFORMATION
    1. HTML Forms
    2. Form Submission
  3. PREREQUISITES
  4. SETUP
    1. Overview
    2. Line-by-Line Analysis
  5. COMMON APPLICATIONS
    1. Custom Shopping Cart
    2. In-House Database of Customers
    3. Advanced Shipping or Taxes
    4. Numerous Product Variations
    5. Any Application with Numerous Possible Product Prices
  6. TROUBLESHOOTING
  7. GLOSSARY
  8. APPENDICES
  9. APPENDIX A: Input variables list
  10. APPENDIX B: Output variables list
  11. APPENDIX C: HTML source


4.2. Line-by-Line Analysis

Line 10: <FORM method=post action="https://auth.mypaysystems.com/cgiv310/ payment/onlinesale-tpppro.asp">

This line defines the beginning of the form. The method is the way we are sending the information. The action property of this form tells the form where to send the information contained in the input fields. For all myPaySystems-Pro accounts, the action property should be https://auth.mypaysystems.com/cgi-v310/payment/onlinesaletpppro. asp for credit cards or https://auth.mypaysystems.com/cgi-v310/payment/onlinesaletpppro_ check.asp for online check processing.

Line 15: <INPUT type="hidden" name="product1" value="Basic Hosting"> This line creates the first hidden input field. This field named “product1” contains the name of this particular product that is being ordered.

Line 16: <INPUT type="hidden" name="total" value="45"> This line creates a second hidden input field named “total”. The value property of this field should be the total amount of this transaction.

Line 19: <INPUT type=hidden name="companyid" value="3800"> This line creates another hidden input field called “companyid”. This field is one of the most important that will be discussed. The merchant must change this value to their respective Company ID. Otherwise, the myPaySystems-Pro application will not work.

Line 22: <INPUT type=hidden name="formget" value="Y"> This hidden input field named “formget” sets which method myPaySystems.com will use to send consumer and order information to the redirect URL. If this field’s value is set to “Y” the information will be sent with the GET method; if it set to “N”, the information will be sent via the POST method.

Line 23: <INPUT type=hidden name="redirect" value="http://www.yourwebsite.com">
This input field called “redirect” sets the redirect URL for this transaction. The consumer will be brought to this page after they have successfully transacted with myPaySystems.com. As mentioned above in line 22, depending on “formget”, order output variables (such as amount, order number, etc, see Appendix B), will also be sent to this URL. Note: Only consumers whose cards are authorized are brought to this page.

Line 24: <INPUT type=hidden name="redirectfail" value="http://www.yourwebsitefail.com">
This field named “redirectfail” sets the redirect URL for all consumers who do not successfully transact with myPaySystems.com. Its value should be set to a page the merchant wishes to send a consumer whose credit card has been declined.. Note: Only consumers whose cards are declined, and click on “continue” on the myPaySystems.com order declined page will be brought to this page.

Line 29: <INPUT type=hidden name="option1" value="domain name: www.custom.com">
This input field is (as one can tell from figure IV-1) is one of ten user-defined parameters that can be sent to the myPaySystems-Pro application. This was just included as an example. These optional fields can hold any information the merchant would like. myPaySystems.com does nothing with these optional parameters. The myPaySystems-Pro application simply stores these parameters with the order for future reference.

Line 32: <INPUT type=hidden name="reoccur" value="Y">
This input field called “reoccur” determines whether this transaction will be a recurring transaction. A recurring transaction is one that is charge many times. When this is set to “Y”, the next three input fields are mandatory (line 33, 34 and 35). Together, these four parameters define how often, how many times and at what amount a charge should reoccur. As can be seen in figure IV-1, this field is optional. As such, if it is omitted, the default is “N”. In other words, when this field is omitted, the charge will not reoccur.

Line 33: <INPUT type=hidden name="cycle" value="30"> The parameter “cycle” determines how often the transaction will reoccur. The value property (in days) is the number of days between the charges. In this example, the transaction will be charged every thirty days.

Line 34: <INPUT type=hidden name="totalperiod" value="12">
The parameter “totalperiod” sets the number of times the transaction will reoccur. The cycle will be repeated for the totalperiod specified in the value property. In this case, the transaction will reoccur once a month for the next year.

Line 35: <INPUT type=hidden name="repeatamount" value="20">
This input field sets the amount for the reoccurring transaction. At first, this may seem redundant. This parameter allows the merchant to set a different amount for the initial charge than for the reoccurring charges. This allows for a setup fee to be included. Putting all this information together, the initial charge for this transaction will be 45$. Then every month, for eleven months, the consumer will be charged 20$.

Line 38: <INPUT type=hidden name="b_firstname" value="Justin">
This input field contains the first name of the cardholder. This information is optional for the following reason. If this information is not specified, the consumer must enter this information manually on the myPaySystems.com order site. If it is specified, then the information will be populated on the myPaySystems.com order page with the given billing information. In other words, if this information is provided to the myPaySystems-Pro system, the consumer will not have to enter it on the myPaySystems.com web site; it will already appear in the appropriate fields. This applies to all consumer billing information provided to the myPaySystems-Pro system (lines 38 through 47).

Line 39: <INPUT type=hidden name="b_middlename" value="">
The value property of parameter “b_middlename” should contain the cardholder’s middle name. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 40: <INPUT type=hidden name="b_lastname" value="Francis">
The value property of parameter “b_lastname” should contain the consumer’s last name. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 41: <INPUT type=hidden name="b_address" value="2075 University">
The value property of parameter “b_address” should contain the consumer’s billing address. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 42: <INPUT type=hidden name="b_city" value="Montreal">
The value property of parameter “b_city” should contain the consumer’s billing city. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 43: <INPUT type=hidden name="b_state" value="Quebec">
The value property of parameter “b_state” should contain the consumer’s state or province. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 44: <INPUT type=hidden name="b_zip" value="H3G1Y4">
The value property of parameter “b_zip” should contain the consumer’s zip code or postal code. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 45: <INPUT type=hidden name="b_country" value="CA">
The value property of parameter “b_country” should contain the consumer’s billing country, expressed as a two-character country code. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 46: <INPUT type=hidden name="b_tel" value="5144484819">
The value property of parameter “b_tel” should contain the consumer’s telephone number. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 47: <INPUT type=hidden name="email" value="consumer@email.com">
The value property of parameter “email” should contain the consumer’s email address. This field is optional and used for pre-population only. If the variable is not sent by the merchant, the consumer will enter it on the payment page.

Line 50: <input type=hidden name="delivery" value="N">
The value property of parameter “delivery” should be “Y” if the merchant is sending shipping information, and “N” if they are not.

Line 51 to 59: shipping parameters
The shipping parameters are exactly the same as the billing parameters, except that the name of the parameter begins with an “s” instead of a “b”. These fields are self-explanatory. If these fields are sent, then the delivery field must be set to “Y”.

Line 90: <INPUT type=submit value="Submit Order">
This input type is simply the submit button for this form. When the consumer clicks the button, the form will send the information and redirect the consumer to the URL contained in the action property of the
tag (see line 10). In this case, the consumer and information contained in the input fields of this form will be sent to be https://auth.mypaysystems.com/cgi-v310/payment/onlinesaletpppro.asp.

This concludes the step-by-step setup of a typical myPaySystems-Pro implementation. All the important parameters and features were discussed. To test this particular example, simply copy the HTML source of the preceding example and paste it into a text document. Then open the demonstration example in a web browser, and click “submit order”. The next page displayed will be the myPaySystems.com payment site with all the information described above.




About     Privacy Policy     Hosting by Web Hosting Canada

Except where otherwise noted, this site is licensed under a Creative Commons License



contact us: elouai@gmail.com
©2003-2008 eLouai.com, All rights reserved