2

我正在使用 AngularJS 实现一个应用程序,Webapi 在一个解决方案中采用了两个项目,我在客户端使用了 checkout.js,然后生成了 razorpay_payment_id。但是在我使用的服务器端 WebAPI 应用程序中

string key = System.Configuration.ConfigurationManager.AppSettings["KeyId"];
string secret = System.Configuration.ConfigurationManager.AppSettings["KeySecret"];

// Initialize RazorPay Payment Gateway
RazorpayClient client = new RazorpayClient(key, secret);

//Get Payment Using Id
Payment rPayment = client.Payment.Fetch(reservation.PaymentId);

使用它RazorpayClient client = new RazorpayClient(key, secret);不会获取任何razorpay_payment_id信息。所以它显示错误

{“你调用的对象是空的。”}

..在剃刀支付中。

我已经在测试模式下生成了keyidand keysecret

为什么 razorpayclient 信息不使用密钥和秘密?

4

1 回答 1

5

我收到了 Razorpay 集成支持的回复。这是因为 TLS 版本不正确。在顶部添加这一行,代码就可以正常工作了。

ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 |
(SecurityProtocolType)768 | (SecurityProtocolType)3072;

参考:.NET 4.5 中的默认 SecurityProtocol

于 2018-08-23T17:06:14.110 回答