如何在 asp.net 网络表单中集成 instamojo 支付网关
How to integrate instamojo payment gateway in asp.net web forms
我不熟悉在 ASP.Net 中集成支付网关。所以我想知道将其集成到我的 ASP.Net 网络应用程序的步骤。我已经从 Instamojo 提供的 Github 下载了 C# 包装器作为参考。但我的想法是 null/NIL 因为我不知道该做什么以及该怎么做。所以我需要有人来阐明这个话题。我尝试在互联网上搜索,不幸的是没有结果..
到目前为止我什么也没试过。我只有 ASP.Net 网络应用程序和 C# .NET 包装器(他们称之为..)。
在 asp.net c#
中集成 Instamojo 支付网关
我会分步骤列出:
第 1 步:Instamojo 提供了两个帐户
- 实时/生产帐户 - www.Instamojo.com
- 测试账户 - test.instamojo.com
所以在 test.instamojo.com 中创建一个帐户并转到仪表板并创建新的测试凭据,如下所示 [将提供 clientID 和 client Secret]
第 2 步:转到 https://github.com/Instamojo/instamojo-csharp 并从那里下载 c# 包装器 [文件名] 并解压缩并打开
Steo 3 : 只需从 downloaded/extracted 文件夹中复制 InstamojoAPI 文件夹并将其粘贴到您想要的项目中
第 4 步:将代码复制到 github link - https://github.com/Instamojo/instamojo-csharp 中名为 Create new payment order under payments API 的部分,并将其复制到您的项目中在一个新的 form/file
第 5 步:复制后,在您的代码中将客户端 ID 替换为您的测试客户端 ID,将客户端密码替换为您的测试客户端密码,将端点替换为以下 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]”);
第 6 步:您必须提供这些参数,如下所示
第 7 步:然后在您的项目中找到以下代码并将消息框替换为 response.redirect,如下所示
就这样,你可以开始了。触发 运行 按钮并查看如下结果
首先您的 localhost 主页将会启动。你必须创建一个像下面这样的表格
然后在支付按钮上点击这个应该会出现
然后..这个.. [您的 test/sandbox 账户详情在这里 - https://support.instamojo.com/hc/en-us/articles/208485675-Test-or-Sandbox-Account]
[]7
然后终于
然后在付款后它应该重定向到您之前指定的 redirection_url。
像这样
objPaymentRequest.redirect_url = “redirect_url”;
就是这样..编码愉快
我不熟悉在 ASP.Net 中集成支付网关。所以我想知道将其集成到我的 ASP.Net 网络应用程序的步骤。我已经从 Instamojo 提供的 Github 下载了 C# 包装器作为参考。但我的想法是 null/NIL 因为我不知道该做什么以及该怎么做。所以我需要有人来阐明这个话题。我尝试在互联网上搜索,不幸的是没有结果..
到目前为止我什么也没试过。我只有 ASP.Net 网络应用程序和 C# .NET 包装器(他们称之为..)。
在 asp.net c#
中集成 Instamojo 支付网关我会分步骤列出:
第 1 步:Instamojo 提供了两个帐户
- 实时/生产帐户 - www.Instamojo.com
- 测试账户 - test.instamojo.com 所以在 test.instamojo.com 中创建一个帐户并转到仪表板并创建新的测试凭据,如下所示 [将提供 clientID 和 client Secret]
第 2 步:转到 https://github.com/Instamojo/instamojo-csharp 并从那里下载 c# 包装器 [文件名] 并解压缩并打开
Steo 3 : 只需从 downloaded/extracted 文件夹中复制 InstamojoAPI 文件夹并将其粘贴到您想要的项目中
第 4 步:将代码复制到 github link - https://github.com/Instamojo/instamojo-csharp 中名为 Create new payment order under payments API 的部分,并将其复制到您的项目中在一个新的 form/file
第 5 步:复制后,在您的代码中将客户端 ID 替换为您的测试客户端 ID,将客户端密码替换为您的测试客户端密码,将端点替换为以下 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]”);
第 6 步:您必须提供这些参数,如下所示
第 7 步:然后在您的项目中找到以下代码并将消息框替换为 response.redirect,如下所示
就这样,你可以开始了。触发 运行 按钮并查看如下结果
首先您的 localhost 主页将会启动。你必须创建一个像下面这样的表格
然后在支付按钮上点击这个应该会出现
然后..这个.. [您的 test/sandbox 账户详情在这里 - https://support.instamojo.com/hc/en-us/articles/208485675-Test-or-Sandbox-Account]
[
然后终于
然后在付款后它应该重定向到您之前指定的 redirection_url。 像这样
objPaymentRequest.redirect_url = “redirect_url”;
就是这样..编码愉快