PayPal Express: Could not create SSL/TLS secure channel

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

PayPal Express: Could not create SSL/TLS secure channel

Post by efficiondave » Wed Jul 02, 2014 2:16 pm

I'm trying to implement PayPal Express on our development site so I can see how it looks prior to rolling it out to our live site.
I've added a self-signed certificate on the server and enabled SSL for the site and that's working properly. I've also added the ConLib:PayPalExpressCheckoutButton scriplet to Basket.aspx.
When I try to use PayPal Express, I'm getting the following error. I wonder if the problem is that I'm using a self-signed certificate...

Server Error in '/' Application.

The request was aborted: Could not create SSL/TLS secure channel.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:


Line 65: {
Line 66: PayPalProvider client = StoreDataHelper.GetPayPalProvider();
Line 67: PayPalProvider.ExpressCheckoutResult result = client.SetExpressCheckout();
Line 68:
Line 69: // IF ERRORS ARE PRESENT, REDIRECT TO DISPLAY THEM

Source File: c:\inetpub\Client Sites\My Site\PayPalExpressCheckout.aspx.cs Line: 67

Stack Trace:


[WebException: The request was aborted: Could not create SSL/TLS secure channel.]
System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) +251
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) +4
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +180
com.paypal.soap.api.PayPalAPIAASoapBinding.SetExpressCheckout(SetExpressCheckoutReq SetExpressCheckoutReq) +124

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +108
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
com.paypal.sdk.core.APICaller.CallSOAP(MethodInfo method, Object obj, Object[] args) +463

[TransactionException: The request was aborted: Could not create SSL/TLS secure channel.]
com.paypal.sdk.core.APICaller.CallSOAP(MethodInfo method, Object obj, Object[] args) +693
com.paypal.sdk.core.APICaller.Call(String operationName, AbstractRequestType request) +1234
com.paypal.sdk.services.CallerServices.Call(String operationName, AbstractRequestType request) +79
CommerceBuilder.Payments.Providers.PayPal.PayPalProvider.SoapCall(String methodName, AbstractRequestType request) +547
CommerceBuilder.Payments.Providers.PayPal.PayPalProvider.SetExpressCheckout() +2280
PayPalExpressCheckout.SetExpressCheckout() in c:\inetpub\Client Sites\Makaboo Beta\PayPalExpressCheckout.aspx.cs:67
PayPalExpressCheckout.Page_Load(Object sender, EventArgs e) in c:\inetpub\Client Sites\Makaboo Beta\PayPalExpressCheckout.aspx.cs:25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +92
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446

User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by efficiondave » Wed Jul 02, 2014 2:19 pm

Alternatively, does anyone have PayPal express hooked up to a sandbox account on a dev site so I can see it in action?

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by Katie » Thu Jul 03, 2014 7:20 am

It's possible that the self-signed SSL is causing the error. If it were me, I would double-check the instructions on setting up Paypal here:

http://help.ablecommerce.com/mergedProj ... paypal.htm

Then, temporarily disable SSL in AbleCommerce and do a test transaction. If it goes through, then turn the SSL back on and try it again. If you get the same error, then it must have to do with the self-signed certificate.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by efficiondave » Thu Jul 03, 2014 7:24 am

I was getting the same error before I turned on SSL. I was hoping setting up SSL would resolve it but it didn't. I'll go through the instructions you posted to make sure everything is correct. Thanks!

User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by efficiondave » Thu Jul 03, 2014 7:56 am

My setup appears to match the instructions except for WSE 3.0. I'm very hesitant about installing WSE 3.0 as it's from 2005 and advises me that I need Netscape Navigator 7.0 or IE 5.2.2 to view the presentation.

User avatar
NC Software
AbleCommerce Partner
AbleCommerce Partner
Posts: 4620
Joined: Mon Sep 13, 2004 6:06 pm
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by NC Software » Sun Jul 06, 2014 8:11 am

WSE runtime is fine, I have it on Win 2008 R2 and Win 2012 R2 and use it for my legacy ASMX services still in use.
Neal Culiner
NC Software, Inc.

User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by efficiondave » Mon Jul 07, 2014 1:34 pm

Installing the WSE runtime made no difference.

User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by efficiondave » Mon Jul 07, 2014 2:28 pm

I went ahead and enabled PayPal for admins only on our live server and am having the same issue so it doesn't seem to be an issue with the certificate either.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by Katie » Mon Jul 07, 2014 7:18 pm

David,

There are two things that you've said in this forum thread that I need to ask about -
I was getting the same error before I turned on SSL.
Are you absolutely sure? It doesn't make sense that you would get an error "could not create SSL/TLS secure channel" if the SSL was disabled in the store, and you also have a non-https URL in the Paypal configuration.
I've also added the ConLib:PayPalExpressCheckoutButton scriplet to Basket.aspx.
When you go through the steps of configuring Paypal in AbleCommerce, the Express checkout button should automatically appear without you having to add any code to the basket page. So, I have to wonder if something went wrong in this process? Are you absolutely sure that you have gone through the configuration steps for PP Express, and that you have the correct URL entered in PP, and that you have a valid API username, password, and signature.

Lastly, when testing in sandbox mode, it can be tricky. You will want to use two separate browsers and make sure you have a sandbox account for the business and personal user - keeping them separate while testing.

I'm assuming you are using some version of Ablecommerce 7, so it would also be a good idea to make sure you have the latest Paypal patch found here - http://help.ablecommerce.com/upgrades/a ... atches.htm#

Thanks
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by efficiondave » Sun Dec 28, 2014 9:01 pm

Katie wrote:
I was getting the same error before I turned on SSL.
Are you absolutely sure? It doesn't make sense that you would get an error "could not create SSL/TLS secure channel" if the SSL was disabled in the store, and you also have a non-https URL in the Paypal configuration.
Yes, absolutely sure. I go to, /Admin/Store/Security/Default.aspx, uncheck SSL Enabled. And I still get the same error. I even removed the SSL binding in IIS to be extra sure.
When you go through the steps of configuring Paypal in AbleCommerce, the Express checkout button should automatically appear without you having to add any code to the basket page. So, I have to wonder if something went wrong in this process? Are you absolutely sure that you have gone through the configuration steps for PP Express, and that you have the correct URL entered in PP, and that you have a valid API username, password, and signature.
We've made various customizations to our store and the Express button had to be re-added in. I'm open to the possibility that our changes are causing the problem but the issue is happening on a separate page. I've double checked the API username, password, and signature. I removed some spaces from the password but that didn't help. I did not have the IPN settings setup properly. I think I may have removed them as part of troubleshooting but regardless, setting them correctly didn't seem to help.
Lastly, when testing in sandbox mode, it can be tricky. You will want to use two separate browsers and make sure you have a sandbox account for the business and personal user - keeping them separate while testing.
While I'm familiar with the approach of using 2 browsers for testing, I don't even get to the point where this is necessary as I never get to the screen where I could log in as the regular user.
I'm assuming you are using some version of Ablecommerce 7, so it would also be a good idea to make sure you have the latest Paypal patch found here - http://help.ablecommerce.com/upgrades/a ... atches.htm#
I'm using 7.0.7. I've applied the PayPal patch, it didn't make any difference.

Thanks,
David

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by Katie » Mon Dec 29, 2014 8:32 am

Hello David,

It's been a number of months since my last post, so I'm not sure if this is applicable to you or not. Please see this post for a recent change with PayPal and SSL -

viewtopic.php?f=65&t=18172

Another thing you can try is to setup a stock installation of AbleCommerce on the same server to see if you can get Paypal working in sandbox mode. At least that way you will know if the issue is caused by any customizations.

Hope this helps.

Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Re: PayPal Express: Could not create SSL/TLS secure channel

Post by efficiondave » Fri Jan 09, 2015 8:58 am

We finally found the solution to this. The endpoints specified in the PayPal_base.dll for PayPal's SandBox are no longer valid.

This post gives the solution:
http://stackoverflow.com/questions/1695 ... e-dll-file

An updated version of the PayPal_base.dll would be a much easier solution for most people.

Post Reply