The Basics:
- After shopping all the required items and filling up the checkout form when the "Order" button is clicked, the customer is taken to the paypal website wherein the customer is prompted for either payment through paypal account or through credit card (if not having a paypal account).
- Now during this redirection from checkout page to paypal website, we need to collect/prefill some values that are required on the paypal website. And these values has to be collected/filled in certain pre-defined "html hidden form variables" termed as "paypal form variables". So we have to put an intermediary page between checkout page and the paypal page where these values can be collected.
- The following is the list of paypal form variables:
<form name="order" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
* <input type="hidden" name="cmd" value="_ext-enter">
* <input type="hidden" name="redirect_cmd" value="_xclick">
* <input type="hidden" name="business" value="testgods@gods.com">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="first_name" value="FirstName">
<input type="hidden" name="last_name" value="LastName">
<input type="hidden" name="address1" value="Address1">
<input type="hidden" name="address2" value="Address2">
<input type="hidden" name="city" value="City">
<input type="hidden" name="zip" value="PostCode">
<input type="hidden" name="country" value="Country">
<input type="hidden" name="email" value="Email">
* <input type="hidden" name="currency_code" value="USD">
* <input type="hidden" name="item_name" value="Your testGods order">
* <input type="hidden" name="amount" value ="OrderAmount">
* <input type="hidden" name="test_ipn" value="1">
* <input type="hidden" name="rm" value="2">
<input type="hidden" name="notify_url" value="http://192.168.101.90:8013/Thanks.aspx">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="cbt" value="Click Here to Complete Order">
* <input type="hidden" name="return" value="http://192.168.101.90:8013/Thanks.aspx">
<input type="hidden" name="cancel_return" value="http://192.168.101.90:8013/Cancel.aspx">
<script type="text/javascript" language="JavaScript">document.order.submit();script>
form>
From the above list, the fields marked as * are the minimum required fields. Out of which the "test_ipn" variable is required only during the test mode. When making live this variable should be removed. In the
No comments:
Post a Comment