Form Creation
- Create a form in the location that the <PAY NOW> button should appear
- Set the form’s action to <https://sandbox.interswitchng.com/webpay/pay>
- Set the form’s HTTP method to POST
- Create hidden fields with details shown the table below. Note that only 7 fields are mandatory .i.e.
- product_id,
- amount,
- currency,
- site_redirect_url,
- txn_ref, hash and
- pay_item_id
- Create a submit button in the form.
1 2 3 4 5 6 7 8 9 10 |
<form name="form1" action="https://sandbox.interswitchng.com/webpay/pay" method="post"> <input name="product_id" type="hidden" value="6204" /> <input name="pay_item_id" type="hidden" value="103" /> <input name="amount" type="hidden" value="50000" /> <input name="currency" type="hidden" value="566" /> <input name="site_redirect_url" type="hidden" value="http://abc.com/getresponse”/> <input name="txn_ref" type="hidden" value="AB-12385_TT" /> <input name="cust_id" type="hidden" value="AD99" > <input name="hash" type="hidden" value="402D39A072B15B557D0E04E74D6F896EAA98EDFF5B81726C52F6A73C6CC729075C526CCF56EB1ADA1E 336BFA297D2288A069385BD4ED210F381B5F61135BBF0D" /> </form> |
For complete list of merchant details when sending request, click here
Details on how to calculate hash are located here