Craft CMS by itself does not process payments. The commerce workflow lives in the first-party Craft Commerce plugin, which adds a cart, checkout, orders, and a pluggable gateway layer (Stripe, PayPal Checkout, and other community gateways). If your site is running vanilla Craft without Commerce installed, there is no payment pipeline to troubleshoot and the sections below will not apply. Everything that follows assumes Commerce is active under Settings → Plugins and that at least one gateway is configured under Commerce → System Settings → Gateways.

On a managed LiteSpeed/CloudLinux account you operate as an unprivileged hosting user. You cannot touch php.ini at the server level, restart services, or edit CA bundles under /etc/. That constraint shapes the entire diagnostic approach: every adjustment happens through the control panel PHP Selector, a per-site .user.ini, the .htaccess file in your document root, phpMyAdmin, and Craft's own control panel and log files. The good news is that the overwhelming majority of real-world Commerce payment failures are solvable from exactly those tools.

Why checkouts fail: PHP limits, HTTPS, and the completeCart step

A broken checkout rarely means the gateway is down. The most common pattern on shared hosting is a payment form that spins, times out, or returns a blank 500 at the commerce/payments/pay action. The underlying causes cluster into three groups: PHP resource ceilings, mixed HTTP/HTTPS context, and a gateway that cannot reach the processor because of an outbound connection problem (covered in the next section).

Start with PHP limits. Commerce serializes the cart, builds a payment request, and waits on a synchronous HTTPS call to the gateway. If max_execution_time is too low or memory_limit is tight, the request dies mid-transaction and you end up with an order stuck in an incomplete state. Because you cannot edit the global config, raise these values per-site. In cPanel open Select PHP Version → Options (the MultiPHP INI Editor also works), or in DirectAdmin use Select PHP Version → Options. Alternatively, drop a .user.ini in your document root (typically /home/USER/public_html or the web/ folder if your Craft root is split):

; .user.ini in the Craft web root
memory_limit = 256M
max_execution_time = 120
max_input_vars = 5000
default_socket_timeout = 60

LiteSpeed reads .user.ini changes after the configured TTL (often 300 seconds) or after you touch the file again, so wait a few minutes before retesting. Confirm the active values by checking Utilities → System Report → PHP inside the Craft control panel rather than a stray phpinfo() file.

Next, verify HTTPS consistency. Gateways reject payment sessions initiated over plain HTTP, and Stripe Elements or PayPal's SDK will silently fail to mount if the page is mixed-content. Force canonical HTTPS at the edge with a clean rule in .htaccess, placed above Craft's own rewrite block:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Because LiteSpeed sits behind a proxy layer on many stacks, also tell Craft to trust the forwarded protocol. In config/general.php set the environment-aware trusted proxy headers; without this Craft may generate http:// return URLs that the gateway refuses. A mismatch here is the single most frequent reason a Stripe redirect lands back on an error page after an otherwise successful charge.

Diagnosing cURL and TLS handshake failures

When the Craft log shows cURL error 60: SSL certificate problem, cURL error 35, or cURL error 7: Failed to connect, the payment request never left your server cleanly. These are outbound HTTPS problems, and on shared hosting they usually trace to one of three things: an outdated CA bundle reference, an old TLS version negotiated by the account's PHP build, or outbound firewall rules blocking the gateway endpoint.

Read the exact error first. Craft writes gateway failures to storage/logs/web.log and, for console-triggered actions, storage/logs/queue.log and storage/logs/console.log. Open these through the File Manager rather than guessing. A cURL error 60 points at certificate verification. You cannot replace the system CA bundle, but you can point PHP at a current one you control. Download the Mozilla bundle, upload it to a private path such as /home/USER/certs/cacert.pem, and reference it via .user.ini:

; .user.ini
curl.cainfo = "/home/USER/certs/cacert.pem"
openssl.cafile = "/home/USER/certs/cacert.pem"

A cURL error 35 signals a TLS negotiation problem, almost always a gateway that now requires TLS 1.2 or 1.3 while the account is pinned to an older PHP build. The fix is to move to a modern interpreter in Select PHP Version (Craft 4 wants PHP 8.0.2+, Craft 5 wants PHP 8.2+), since newer builds ship with current OpenSSL support. Do not attempt to downgrade the gateway's TLS requirement; Stripe and PayPal have retired TLS 1.0/1.1 entirely.

A cURL error 7 or connection timeout means the endpoint is unreachable. On locked-down shared servers outbound ports can be filtered. Confirm the gateway's API host (for example api.stripe.com on 443) is reachable; if a timeout persists after confirming DNS resolves, this is one of the few issues requiring a support ticket, because outbound firewall policy is above the hosting-user privilege line. Phrase the request precisely: name the destination host and port rather than asking for a generic "open the firewall."

Webhook delivery, callback URLs, and transaction logging

Webhooks are how a gateway confirms asynchronous events: a delayed charge succeeding, a dispute opening, or a subscription renewing. Craft Commerce exposes gateway webhook endpoints at a predictable path, typically https://yourdomain.com/index.php?p=actions/commerce/webhooks/process-webhook&gateway=GATEWAYID, or the prettier /actions/commerce/webhooks/process-webhook when omitScriptNameInUrls is enabled. Copy the exact URL from the gateway's edit screen under Commerce → System Settings → Gateways and paste that into the processor's dashboard (Stripe's Developers → Webhooks, PayPal's webhook settings). A trailing-slash or scheme mismatch is enough to make every delivery fail.

The most common self-inflicted webhook failure is a .htaccess rule that blocks the incoming POST. Hotlink protection, aggressive bot blockers, a password-protected directory, or a country-based IP deny list will all return 403 to the gateway's servers, which then mark the endpoint as failing. Review any custom blocks and explicitly whitelist the webhook path:

<If "%{REQUEST_URI} =~ m#process-webhook#">
  Require all granted
</If>

Webhook signature verification depends on the raw request body arriving unmodified, so disable any output-altering or caching layer for that route. If you run LiteSpeed Cache, exclude the webhook URL under the plugin's cache exclusion settings and never let a redirect rule rewrite it. Verify the API credentials and signing secret in the gateway settings match the live keys, not test-mode keys left over from staging; a test-key/live-mode mismatch produces a silently rejected signature.

For transaction logging, Commerce records every attempt in the commerce_transactions table with a status, reference, and the raw gateway response. Inspect it through phpMyAdmin when an order's status disagrees with the processor dashboard: query the table filtered by orderId to see whether a redirect, success, or failed row exists and read the JSON response for the real decline reason. Pair that with the Craft control panel at Commerce → Orders, where each order's transaction tab shows the same data in a readable timeline. Keeping devMode off in production while leaving the dedicated log target active gives you the gateway payloads you need without exposing stack traces to shoppers. When a webhook retried successfully but the order never advanced, the mismatch is almost always one of the four issues above: a blocked route, a cached response, a signing-secret mismatch, or a CA/TLS failure on the outbound verification call Commerce makes back to the gateway.