Vtiger CRM handles money in a few distinct ways depending on your edition and configuration. The open-source version ships with Invoice, Sales Order, and Payment modules, and these are commonly connected to external gateways through extensions such as the PayPal/Stripe payment connectors, the Webforms module (for landing-page captures that trigger payment links), and custom Webservices API calls. Whenever one of these paths involves a real transaction, two network directions matter: Vtiger reaching out to a gateway over HTTPS, and the gateway reaching back in to a callback or webhook URL. On shared hosting both directions can quietly fail, and Vtiger tends to report only a generic error while the actual cause sits in a cURL handshake or a blocked endpoint.
Before touching anything, confirm your edition actually performs server-side payment processing. The hosted Vtiger Cloud product manages gateways on Vtiger's own infrastructure, so if you are on that plan there is nothing to fix on your hosting account. This article applies to self-hosted Vtiger (Open Source or on-premise CRM) installed under your DirectAdmin account, where PHP running as your unprivileged hosting user is responsible for contacting gateways and receiving callbacks.
Outbound cURL and TLS failures when contacting gateways
The most frequent symptom is a checkout or invoice-payment action that spins and then returns "Unable to connect to payment gateway" or simply a blank result. Modern gateways (Stripe, PayPal, Authorize.Net, Razorpay) require TLS 1.2 or TLS 1.3 and reject older protocols outright. If your Vtiger site is running on an older PHP build selected in DirectAdmin, the bundled cURL/OpenSSL may negotiate a protocol the gateway refuses, producing SSL handshake errors.
Start by confirming the active PHP version. In DirectAdmin open Account Manager → PHP Selector (or MultiPHP Manager on some layouts) and set your Vtiger domain to a supported branch such as PHP 7.4 or 8.1 depending on your Vtiger release. In the same PHP Selector screen, open the Extensions tab and verify that curl and openssl are enabled. Without those two extensions, every gateway call fails before it starts.
Next, diagnose what cURL is actually doing. Create a throwaway file in your document root using File Manager, for example public_html/tlscheck.php, with a minimal request to the gateway host:
<?php
$ch = curl_init('https://api.stripe.com/v1/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
$res = curl_exec($ch);
if ($res === false) {
echo 'cURL error: ' . curl_error($ch);
} else {
echo 'Connected. HTTP ' . curl_getinfo($ch, CURLINFO_HTTP_CODE);
}
curl_close($ch);
Load that file in your browser. A successful HTTP status (even a 401 from the gateway) proves outbound HTTPS works. An error like SSL certificate problem: unable to get local issuer certificate points at a missing CA bundle, while Could not resolve host or a timeout points at outbound connections being filtered. Delete the test file immediately after.
If the CA-bundle error appears, you cannot edit the server-wide /etc/ configuration as an unprivileged user, but you can supply your own bundle. Download the current cacert.pem from the curl project, upload it to a path like /home/USER/certs/cacert.pem via File Manager, and point PHP at it with a .user.ini file in your Vtiger root:
curl.cainfo = "/home/USER/certs/cacert.pem"
openssl.cafile = "/home/USER/certs/cacert.pem"Allow a couple of minutes for the .user.ini values to be picked up (they refresh on the PHP process TTL), then re-run the test. If outbound connections time out entirely rather than failing on TLS, the host may restrict external ports for shared accounts; open a ticket with Hostiso support to confirm outbound 443 is permitted for your account rather than attempting firewall changes you have no access to.
Receiving callbacks and webhooks into Vtiger
Gateways confirm a payment asynchronously by POSTing to a webhook or return URL you register in their dashboard. In Vtiger these endpoints are typically PHP entry files such as modules/<Gateway>/callback.php or a Webservices route under /webservice.php. Three things break inbound delivery on shared hosting: the wrong scheme or hostname in the registered URL, a rewrite rule that intercepts the request, and HTTP authentication or bot filters that reject the gateway's server-to-server call.
Confirm the public URL first. Vtiger builds absolute URLs from the site_URL value stored in config.inc.php in your CRM root. If that value is http:// but your site serves over HTTPS, callbacks can land on a redirect and lose their POST body. Edit config.inc.php through File Manager and set the full canonical address, for example:
$site_URL = 'https://crm.example.com/';Shared hosting commonly sits behind a proxy or load balancer, so PHP may see the request as HTTP even when the visitor used HTTPS. If Vtiger generates mixed-content or redirect loops for callback endpoints, the proxy-awareness techniques described in our SugarCRM SSL and HTTPS guide translate directly to Vtiger, since both are PHP CRMs on the same LiteSpeed stack.
Next, make sure your .htaccess does not force a redirect that strips the POST. A webhook arriving at http:// that you then 301 to https:// will be re-sent as a GET with no body, and the payment will never reconcile. Register the HTTPS URL in the gateway dashboard directly, and keep your HTTPS canonicalization rule from interfering with callback paths:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/modules/.*/callback\.php$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]If you run a security plugin or a blanket .htaccess rule that blocks empty user-agents or non-browser requests, loosen it for the callback path. Gateway servers often send an empty or custom user-agent, and a rule meant to stop bots will silently return 403 to legitimate webhooks.
API credentials, transaction logging, and reconciliation
Authentication failures look similar to network failures but originate at the gateway. A 401 or "invalid API key" usually means the credentials stored in the Vtiger payment module settings do not match the environment. Check that you have not mixed a test (sandbox) secret key with a live publishable key, and that no trailing whitespace was pasted into the field. For Stripe-style integrations the webhook signing secret is separate from the API key; if signature verification fails, every webhook is rejected with a 400 even though the connection succeeded.
Vtiger records its own side of each attempt. Enable logging by setting the log level in config.inc.php:
$log_level = 'DEBUG';Then watch two files through File Manager: Vtiger's logs/vtigercrm.log for application-level messages, and your account's PHP error_log (DirectAdmin writes one per domain, visible in File Manager or under Metrics → Error Log). A fatal error during a callback, such as a memory exhaustion or a missing intl extension, shows up in the PHP log rather than in Vtiger's own log. Raise per-request limits locally if large payloads time out by adding to .user.ini:
max_execution_time = 120
memory_limit = 256M
post_max_size = 16MFor reconciliation, confirm the transaction actually reached the database. In phpMyAdmin inspect the payment or invoice tables (names vary by module, commonly vtiger_invoice and related payment tables) and compare the gateway's transaction ID against what Vtiger stored. If the gateway dashboard shows a successful charge but Vtiger shows the invoice as unpaid, the webhook either never arrived or threw an error after the charge, and the two logs above will tell you which. Set $log_level back to ERROR once you finish diagnosing so the log file does not grow without bound and leak sensitive request data.