- Log in to Instamojo, and create a link under the Services / Membership Type
- Add a title, description, and a minimum value (10 is the least you can enter. Don't make it zero)
- Enable "Pay what you want"
- In the Advanced Settings section, go to the "Custom Redirection URL", and enter : http://yourdomain.com/modules/instamojo/validation.php
- Save the link
Prestashop assigns an id to each shopping cart, which it needs to get back from the Payment Gateway (Instamojo). So, you must create a custom field on Instamojo
- Navigate to the Instamojo Dashboard at https://www.instamojo.com/dashboard/, find the link you just created, and click on "Custom Fields"
- Enter "TransactionId" (without the quotes) as the field name, make it Required, and click Save. Place your mouse pointer on the field name, you'll see something like Field_1111 (the number will be different). Note that down
- Copy that into the file here :
modules > instamojo > lib > Config.php
in the variableTXN_ID_NAME
.
- Get the HTML code for the Instamojo button for your website (it's different for every merchant) by finding your link in the Instamojo Dashboard and clicking on "Payment Button".
- Put the above HTML code in the file here :
modules > instamojo > views > templates > front > instamojo.tpl
. Replace the code within the<p> .. </p>
tags. - Add the following code to the end of the
href
URL:?embed=form&data_name={$imname}&data_amount={$imamount}&data_phone={$imphone}&data_email={$imemail}&data_{$imcustom}={$imtid}&data_readonly=data_name&data_readonly=data_amount&data_readonly=data_email&data_readonly=data_{$imcustom}&data_hidden=data_{$imcustom}
. If you follow this step, you can skip the fourth step. - Alternatively, you can use the file I supplied directly, but with one important change in instamojo.tpl : Replace the link in the href with the correct username, link and
data-token
value.
- Get your API keys by signing into your Instamojo account and visiting: https://www.instamojo.com/developers/
- Copy them into the file here :
modules > instamojo > lib > Config.php
in the corresponding fields
If you have a question, write to support@instamojo.com and they'll help you out.
If you want to pay the author for this though, you can write to him at me@ankitdaf.com , and he will send across an Instamojo link.
- Download the zip file by clicking the Download button on the right.
- Upload the zip file to the "modules" folder on your server running Prestashop, and unzip it.
- Rename the unzipped folder to "instamojo".
- Login to the Prestashop backend, and go to the "Modules" section.
- Search for "Instamojo", the plugin should show up. Click on Install.
That's it, you are done with the installation with Prestashop!
This plugin is live at http://daflabs.com, in case you want to check out how (smoothly) it works
Instamojo Plugin for Prestahop by Ankit Daftery is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.