SETEX pressCheckout和SSL / TLS错误 [英] setExpressCheckout and SSL/TLS error

查看:288
本文介绍了SETEX pressCheckout和SSL / TLS错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个简单的应用程序,使用户通过贝宝API购买服务关闭网站。此应用程序上运行ASP.NET使用C#。

I'm trying to develop a simple application that will enable users to purchase services off a website through the Paypal API. This application is running on ASP.NET with C#.

我有非常一点运气试图让贝宝API来合作。我打电话的方法是SETEX pressCheckout所有相应的变量。

I have had very little luck trying to get the Paypal API to co-operate. The method I'm calling is SetExpressCheckout with all the appropriate variables.

我做我的研究,发现因为我在本地主机正在测试,它可能会影响到PayPal的与应用程序的沟通能力。所以,我想未来的事情是通过开放端口和一个可公开访问的IP地址访问我的应用程序,但在调用SETEX pressCheckout出现同样的错误。

I did my research and discovered that since I'm testing in Localhost, it may affect Paypal's ability to communicate with the application. So the next thing I tried was accessing my application through an open port and a publicly accessible IP address, but the same error occurs on the call to SetExpressCheckout.

以下是错误:

Exception Details: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.

Source Error: 


Line 1790:        [return: System.Xml.Serialization.XmlElementAttribute("SetExpressCheckoutResponse", Namespace="urn:ebay:api:PayPalAPI")]
Line 1791:        public SetExpressCheckoutResponseType SetExpressCheckout([System.Xml.Serialization.XmlElementAttribute(Namespace="urn:ebay:api:PayPalAPI")] SetExpressCheckoutReq SetExpressCheckoutReq) {
Line 1792:            object[] results = this.Invoke("SetExpressCheckout", new object[] {
Line 1793:                        SetExpressCheckoutReq});
Line 1794:            return ((SetExpressCheckoutResponseType)(results[0]));

Source File: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\anan_p2\730602d6\31a8d74e\App_WebReferences.c8vgyrf8.2.cs    Line: 1792 

我也试过用生成OpenSSL和上传到贝宝帐户的加密选项卖家,但仍然没有效果的证书。

I've also tried generating certificates using OpenSSL and uploading them to the Paypal account's encrypted seller option but still no effect.

非常感谢您通过我的问题阅读!

Thank you very much for reading through my question!

更新:由于这里要求的是code使用

Update: As requested here is the code being used.

        String hostingOn = ConfigurationManager.AppSettings["default_site_url"];
        reqDetails.ReturnURL = hostingOn + "marketplace_confirm.aspx";
        reqDetails.CancelURL = hostingOn + "marketplace.aspx";
        reqDetails.NoShipping = "1";
        reqDetails.ReqConfirmShipping = "0";

        reqDetails.OrderTotal = new BasicAmountType()
        {
            currencyID = CurrencyCodeType.CAD,
            Value = payment_amt.Value,
        };

        SetExpressCheckoutReq req = new SetExpressCheckoutReq()
        {
            SetExpressCheckoutRequest = new SetExpressCheckoutRequestType()
            {
                Version = UtilPayPalAPI.Version,
                SetExpressCheckoutRequestDetails = reqDetails
            }

        };

        PayPalAPIAASoapBinding paypal = new PayPalAPIAASoapBinding();

        paypal.SetExpressCheckout(req);

我也使用 https://api-aa-3t.paypal.com/2.0/ URL访问的API

I am also using the https://api-aa-3t.paypal.com/2.0/ url for accessing the API

推荐答案

你可能会连接到api.paypal.com或api.sandbox.paypal.com,并沿着你的API证书,不发送。该API证书是用于完成​​SSL链的客户机SSL证书。

You're probably connecting to api.paypal.com or api.sandbox.paypal.com, and not sending along your API certificate. The API certificate is a client SSL certificate used to complete the SSL chain.

如果你没有或不使用API​​证书,应该分别连接到api-3t.paypal.com或api-3t.sandbox.paypal.com为Live或沙箱。

If you don't have or are not using an API certificate, you should connect to api-3t.paypal.com or api-3t.sandbox.paypal.com for Live or Sandbox respectively.

这篇关于SETEX pressCheckout和SSL / TLS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆