2012-09-17 38 views
4

我在过去几个月实施了在线商店,并且已成功连接到PayPal的PayPal专业版网关的沙箱。它从一开始就工作完美无瑕。使用PayPal支付专业版的问题

由于在周末它不再工作。该商店给我以下错误:

 
    ERROR CALLING PAYMENT GATEWAY 

    The trace gives me this error: 

    Could not create SSL/TLS secure channel 

    Page URL:/checkoutreview.aspx Source:System.Web.Services Message:The request was aborted: Could not create SSL/TLS secure channel. 
    Stack Trace: 
    at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) 
    at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) 
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) 
    at AspDotNetStorefrontGateways.Processors.PayPalAPIAASoapBinding.DoDirectPayment(DoDirectPaymentReq DoDirectPaymentReq) in C:\Development\Natrol\AspDotNetStorefront\ASPDNSFGateways\PayPalSvcAPIv30.cs:line 956 
    at AspDotNetStorefrontGateways.Processors.PayPal.ProcessCard(Int32 OrderNumber, Int32 CustomerID, Decimal OrderTotal, Boolean useLiveTransactions, TransactionModeEnum TransactionMode, Address UseBillingAddress, String CardExtraCode, Address UseShippingAddress, String CAVV, String ECI, String XID, String& AVSResult, String& AuthorizationResult, String& AuthorizationCode, String& AuthorizationTransID, String& TransactionCommandOut, String& TransactionResponse) in C:\Development\Natrol\AspDotNetStorefront\ASPDNSFGatewayProcessors\GatewayPayPal\PayPal.cs:line 415 
    at AspDotNetStorefrontGateways.GatewayTransaction.CallGateway(String gateway) in C:\Development\Natrol\AspDotNetStorefront\ASPDNSFGateways\GatewayTransaction.cs:line 205 
    at AspDotNetStorefrontGateways.GatewayTransaction.Process() in C:\Development\Natrol\AspDotNetStorefront\ASPDNSFGateways\GatewayTransaction.cs:line 176 

这是怎么回事?任何想法发生了什么事以及如何解决它?为什么它会突然一下子破裂?

感谢, 迈克尔

回答

2

我猜您正在使用“签名”,而不是“证书:权威性而从本地IP测试

贝宝沙箱环境时,可能会运行就会犯糊涂? :)(Paypal的官方回复),并希望在某些调用中看到“证书”

我们有一个实例,我们使用的.NET PayPal API API与APISignature auth - 意思我们没有办法改变端点.NET sdk版本51),并且我们没有安装证书(不需要签名au日)。创建配置文件的功能在沙箱上运行FINE(CreateRecurringPaymentsProfile),但是执行事务查找(TransactionSearch)会导致“无法创建SSL/TLS安全通道”。当我们转向“现场”环境时,两者都可以正常工作。

我们发现的唯一的解决方法是更改​​为“证书:AUTH,安装证书,它似乎做工精细哪个皇室PITA

3

如果您使用以下条件为真。‘签名’认证:

的一点是,几个星期前,终点https://api.sandbox.paypal.com/2.0/停止工作现在应该用这一个,而不是:https://api-3t.sandbox.paypal.com/2.0/

要做到这一点,我改变了沙箱端点“贝宝endpoint.xml”在PayPal的SDK中。下载SDK,找到“paypal-endpoint.xml”,找到Sandbox部分并将地址更改为一个地方上面的内容。然后重新编译paypal_base.dll并使用它

这里发布了非常类似的解决方案,但XML在web.config中发布:www。 X 。 COM /开发商/贝宝/论坛/贝宝沙盒/ C-SDK-沙三令牌端点

谷歌为 “贝宝终端”,以获取有关当前PayPal的端点

+0

如果使用paypal_base.dll,那么你需要更改URL被嵌入到它和PayPal还没有发布一个新的(尚未)。 要覆盖设置,需要将以下内容添加到web.config文件中。(请参阅下面的答案,因为文字太长而无法发表评论) – tkerwood

9

如果使用paypal_base更多信息.dll,那么您需要更改的网址将嵌入其中,并且PayPal尚未发布新网址(至今)。要覆盖设置,需要将以下内容添加到web.config文件中。 将以下内容添加到< configSections>中。

<section name="paypal" type="com.paypal.sdk.core.ConfigSectionHandler, paypal_base"/> 

然后添加以下<贝宝>部分。

<paypal> 
    <endpoints> 
     <wsdl> 
     <environment name="live"> 
      <port name="PayPalAPI">https://api.paypal.com/2.0/</port> 
      <port name="PayPalAPIAA">https://api-aa.paypal.com/2.0/</port> 
      <port name="PayPalAPI" threetoken="true">https://api-3t.paypal.com/2.0/</port> 
      <port name="PayPalAPIAA" threetoken="true">https://api-aa-3t.paypal.com/2.0/</port> 
     </environment> 
     <environment name="sandbox"> 
      <port name="PayPalAPI">https://api.sandbox.paypal.com/2.0/</port> 
      <port name="PayPalAPIAA">https://api-aa.sandbox.paypal.com/2.0/</port> 
      <port name="PayPalAPI" threetoken="true">https://api-3t.sandbox.paypal.com/2.0/</port> 
      <port name="PayPalAPIAA" threetoken="true">https://api-3t.sandbox.paypal.com/2.0/</port> 
     </environment> 
     </wsdl> 
    </endpoints> 
    </paypal> 

(见https://www.x.com/developers/paypal/forums/paypal-sandbox/c-sdk-sandbox-three-token-endpoint

+0

这对我有很大的帮助,谢谢。 –

+0

是很好的答案..没有必要重新编译该DLL,只是覆盖配置部分。谢谢 – Doug