I have integrated instamojo payment gateway in Codeigniter. I want to enable sandbox mode in instamojo payment gateway, i can not see any option to change mode to sandbox or test mode.Can anyone tell me how to change that.
Thank You in Advance.
Asked
Active
Viewed 4,332 times
2

Naim Malek
- 1,186
- 1
- 11
- 21
-
You should check what is sandbox `$endpoint` and set your code to that. Find it on payment gateway provider docs. – Tpojka May 05 '16 at 12:51
-
Are you using Instamojo's [PHP wrapper](https://github.com/Instamojo/instamojo-php) there? – Ashwini Chaudhary May 05 '16 at 19:12
-
I have alrady tried to find in provided doc but i am not getting @Tpojka. – Naim Malek May 06 '16 at 04:34
-
Yes I am using [PHP Wrapper](https://github.com/Instamojo/instamojo-php) @AshwiniChaudhary – Naim Malek May 06 '16 at 04:34
1 Answers
9
The Instamojo
class initializer accepts a third argument that can be used to specify the API URL, it defaults to: https://www.instamojo.com/api/1.1/
Hence for the test environment you can do:
$api = new Instamojo\Instamojo(
'[API_KEY]',
'[AUTH_TOKEN]',
'https://test.instamojo.com/api/1.1/');
Note that for this to work you'll have to create an account on https://test.instamojo.com first and also make sure you're using the credentials from https://test.instamojo.com/developers/.

Ashwini Chaudhary
- 244,495
- 58
- 464
- 504
-
-
@AshwiniChaudhary can we add instamojo in CodeIgniter. if you have any suggestion link then please suggest in a comment. thanks – always-a-learner Jul 18 '17 at 12:16
-
@ankitsuthar There's no plugin for CodeIgniter from our end. You will have to use our API and roll out something of your own: https://docs.instamojo.com/v1.1/docs – Ashwini Chaudhary Jul 18 '17 at 12:21
-
@AshwiniChaudhary sir, can you please tell me what to do when i have to change the test server to go live server. I mean i have done testing so i want to move it to live ? what should i do? – always-a-learner Oct 04 '17 at 05:50
-
@ankitsuthar Start using your production API key, Auth token and simply remove the third argument(as it by default points to production). – Ashwini Chaudhary Oct 04 '17 at 05:52
-
@AshwiniChaudhary Thanks for the reply sir , so you are telling me that so now on i can remove `api_url` and just need the `api_key` & `auth_token` ? – always-a-learner Oct 04 '17 at 05:54
-