I am new to integrating payment gateway in ASP.Net. So I want to know the steps to do for integrating that to my ASP.Net web app. I have downloaded the C# wrapper from Github provided as a reference by Instamojo. But my mind is null/NIL cause I don't know what and how to do. So I need someone to shed some light on this topic. I tried searching the internet, unfortunately no results..
I tried nothing so far. I just have my ASP.Net web app and the C# .NET wrapper (That is what they call it as..) with me.
Integrating Instamojo payment gateway in asp.net c#
I'll list it in steps:
Step 1 : There are two accounts provided by Instamojo
Step 2 : Go to https://github.com/Instamojo/instamojo-csharp and download the c# wrapper [filename] from there and extract it and open
Steo 3 : Just copy the InstamojoAPI folder from the downloaded/extracted folder and paste it in your project desired
Step 4 : Copy the code unser the section named Create new payment order under payments API in the github link - https://github.com/Instamojo/instamojo-csharp and copy that in your project in a new form/file
Step 5 : After copying, in your code Replace client id with your test client id, client secret with your test client secret, endpoint with the following url : https://test.instamojo.com/v2/ and authendpoint with the following url : https://test.instamojo.com/oauth2/token/
Instamojo objClass = InstamojoImplementation.getApi( “[client_id]”, “[client_secret]”, “[endpoint]”, “[auth_endpoint]”);
Step 6 : You have to provide these parameters as shown below
Step 7 : Then find the below code in your project and replace the messagebox with response.redirect like below
Thats it you are good to go. Fire the run button and see the results as below
First your localhost home page will fire. you have to create a form like this below
Then on pay button click this should appear
Then..this.. [Your test/sandbox acnt details in here - https://support.instamojo.com/hc/en-us/articles/208485675-Test-or-Sandbox-Account] [ ] 7
then after payment it should redirect to your redirection_url as specified before. like this
objPaymentRequest.redirect_url = “redirect_url”;
Thats it.. Happy coding
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.