thenbrent / paypal-digital-goods

The missing PayPal Digital Goods PHP library. Discontinued - PayPal no longer offer the Digital Goods product.
Other
121 stars 36 forks source link

Fatal error: Uncaught exception 'Exception' with message 'SetExpressCheckout failed #39

Closed NitinPrakash closed 8 years ago

NitinPrakash commented 8 years ago

Code working fine on my localhost but throwing error on actual domain

Fatal error: Uncaught exception 'Exception' with message 'SetExpressCheckout failed: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure(35)' in /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php:214 Stack trace: #0 /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php(162): PayPal_Digital_Goods->call_paypal('SetExpressCheck...') #1 /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php(301): PayPal_Digital_Goods->request_checkout_token() #2 /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php(327): PayPal_Digital_Goods->get_buy_button(Array) #3 /nfs/c11/h05/mnt/204951/domains/8print.co/html/estimate.php(386): PayPal_Digital_Goods->print_buy_button() #4 {main} thrown in /nfs/c11/h05/mnt/204951/domains/8print.co/html/admin/inc/paypal-digital-goods/paypal-digital-goods.class.php on line 214

thenbrent commented 8 years ago

@NitinPrakash your server has an invalid root certificate or other SSL issue and needs to be updated. Some more details here:

NitinPrakash commented 8 years ago

For time being i have edited code as a workaround and it worked for me

// Make sure we use TLS as PayPal no longer supports curl_setopt( $ch, CURLOPT_SSLVERSION, 6 );

thenbrent commented 8 years ago

@NitinPrakash ah that's for letting me know. That may actually be a bug in the library in that case. I think I will remove the curl_setopt( $ch, CURLOPT_SSLVERSION , 1 ) code from the library completely.

thenbrent commented 8 years ago

@NitinPrakash I've removed that setting of CURLOPT_SSLVERSION with SHA: 1e7ccbd so the default value will now be used instead.