如何在asp.net网络表单中集成instamojo付款网关

时间:2019-02-04 08:19:58

标签: c# asp.net payment-gateway

我是第一次将支付网关集成到ASP.Net中。因此,我想知道将其集成到我的ASP.Net Web应用程序中的步骤。我已经从Github下载了C#包装器,作为Instamojo的参考。但是我的想法是null / NIL,因为我不知道该怎么办。所以我需要一个人来阐明这个话题。我尝试搜索互联网,很遗憾没有结果。

到目前为止,我什么也没尝试。我只带了我的ASP.Net Web应用程序和C#.NET包装器(这就是他们所说的..)。

1 个答案:

答案 0 :(得分:-1)

将Instamojo付款网关集成到asp.net c#

我将分步列出它:

第1步:Instamojo提供了两个帐户

  • 真实/制作帐户-www.Instamojo.com
  • 测试帐户-test.instamojo.com 因此,请在test.instamojo.com中创建一个帐户,然后转到仪表板并创建新的测试凭据,如下所示[将提供clientID和client Secret]

enter image description here

第2步:转到https://github.com/Instamojo/instamojo-csharp并从那里下载c#包装器[文件名]并解压缩并打开

Steo 3:只需从下载/提取的文件夹中复制InstamojoAPI文件夹并将其粘贴到所需的项目中

enter image description here

第4步:在github链接-https://github.com/Instamojo/instamojo-csharp中的“在付款API下创建新付款订单”部分中复制代码,并以新的格式/文件将其复制到您的项目中

步骤5:复制后,在代码中将客户端ID替换为测试客户端ID,将客户端密钥替换为测试客户端密钥,将端点替换为以下URL:https://test.instamojo.com/v2/,将authendpoint替换为以下URL:{{3 }}

Instamojo objClass = InstamojoImplementation.getApi( “[client_id]”, “[client_secret]”, “[endpoint]”, “[auth_endpoint]”);

第6步:您必须提供以下参数,如下所示 https://test.instamojo.com/oauth2/token/

第7步:然后在您的项目中找到以下代码,并用如下所示的response.redirect替换消息框

enter image description here

就这样,你很好。触发运行按钮,然后看到以下结果

首先,您的本地主机主页将被触发。您必须在下面创建一个这样的表单 enter image description here

然后点击“付款”按钮,这应该会出现 enter image description here

然后..this .. [这里的测试/沙盒详细信息-enter image description here [enter image description here] https://support.instamojo.com/hc/en-us/articles/208485675-Test-or-Sandbox-Account]

然后终于  7

然后付款后,它应按照之前指定的方式重定向到您的redirection_url。 像这样

objPaymentRequest.redirect_url = “redirect_url”;

就这样了。快乐的编码