Paysnap Stripe error - any ideas?

Last week, client called up to say customers suddenly unable to purchase using Stripe. When clicking ‘Buy Now’ the following error occurred:

Unexpected error communicating with Stripe. If this problem persists, let us know at (Network error [errno 77]: error setting certificate verify locations: CAfile: /home/kingsmil/public_html/rw_common/plugins/stacks/paysnap/lib/vendor/stripe/stripe-php/data/ca-certificates.crt CApath: none)

and did not connect to Stripe Checkout.

I republished the site having first re-added the Stripe keys and all worked fine for the next 3 days. Today however, the same issue has cropped up. It looks like Stripe is looking for a data file on the website server but not finding it. Any ideas?

I have contacted STRIPE but didn’t get too far before losing the chat! I’ll have another go. Meanwhile, I have republished the site from scratch and it’s working again. However, can’t have this cropping up every few days!

Hi, I had the exact same thing: A republish fixed it, for only for a short while.

I searched the forums but never saw it mentioned, and it was only on one site out of a few I have using Paysnap, so put it down to summit weird in the project. Fortunutely the client upgraded to my CMS online store solution, so I never bothered to dig deeper.

I do still have to old project with Paysnap that had the issue, so happy to try to do some comparing with you to see if they have any similarities.

The site was built in Foundry. Although I’m confident it’s not Foundry, as I’ve other sites built in it using Paysnap that are fine.

I’ve sent a ticket to Yabdab so hopefully he’ll have some idea. I’ve checked the file path and it’s there OK. I found a similar issue elsewhere on a forum - something to do with Stripe changing their CA Bundle Path (beyond me), also deprecated php version and another with TLS 1.2 upgrade being required. I’ve updated the account to php 8 and TLS 1.2 is our version but other than that - just waiting for it to break again!

Do keep me informed on this one, if you don’t mind?

will do!

Still no solution to this. It recurs every 5-10 days and republishing the project fixes it every time - but just for a further 5-10 days. Not getting this issue anywhere else. Both Stripe and Yabdab say it’s not their issue - got that piggy in the middle feeling!

Looks like we may have a fix courtesy of our hosting support at Clook (UK).

This is getting the CA certificate bundle from . That actually redirects to , and the CA file in rw_common/plugins/stacks/paysnap/lib/vendor/stripe/stripe-php/data/ca-certificates.crt was just a “The document has moved” response from the first URL.

I’ve updated data/ca-certificates.crt from Can you see if this is working as expected now?

Answer from me - ‘yes this has fixed the issue’.

I then asked if they had any idea why the problem is fixed when I publish only to fail after a few days: Their response:

You probably have a good copy of the CA file in the version you’re uploading, and the plugin occasionally updates the CA file automatically.

It looks like ./rw_common/plugins/stacks/paysnap/lib/vendor/stripe/stripe-php/update_certs.php is the script that actually does the update. Changing the URL in that file to instead of should stop it from breaking. Alternatively, adding:
CURLOPT_FOLLOWLOCATION => true, to the options array in that script should make it follow any redirects to find the correct file instead of saving the “The document has moved” page.

My only final question is why this isn’t happening on my other Paysnap 3 sites and I’m wondering if it is because this site is quite old and originally used an older version of Paysnap. This has been upgraded but maybe the script is still an older one? Just a hypothesis.

@yabdab I’d welcome your thoughts on this. Many thanks