Switching to developer mode
Before debugging any Magento 2 issue, you should enable Magento’s developer mode, as it’s hard to debug Magento 2 errors while in production mode.
Error logging and server-side errors (HTTP 500)
Magento logs any errors and exceptions it encounters during application runtime in the
/var/log directory. You can find these errors in the following two files:
If you have SSH access, you can filter the error messages with the following command:
grep -i Stripe var/log/system.log
You can display errors live in the console as they occur (or when you refresh a given page). To monitor errors, run the following command to watch the error log:
tail -f var/log/*
If you don’t have shell access, you can download this file and search for Stripe errors with a text editor.
Upgrades and caching issues
If you have upgraded the module but for some reason you don’t see the new changes, you can manually clear the Magento 2 cache by deleting a set of directories. The official Magento documentation describes which directories to delete for Magento 2.2 and Magento 2.3.
After you delete these directories, run the following commands to refresh your Magento cache and static assets:
php bin/magento setup:upgrade php bin/magento cache:flush php bin/magento setup:static-content:deploy
If you’re running in production mode, you may also have to recompile Magento:
php bin/magento setup:di:compile
If you’re running Varnish, you must also restart Varnish after deleting the var/cache/* files. Some browsers also cache Magento 2 requests; if you still have caching issues, try a different browser.
Unable to use Stripe.js
This may also be an issue related to a conflicting OneStepCheckout module.
php bin/magento module:disable Vendor_ModuleName php bin/magento setup:upgrade php bin/magento cache:clean
If the problem persists after attempting the steps above, please contact email@example.com for further guidance.
Stuck loading a spinner on the checkout page
This usually occurs due to a server-side error. Server-side errors are included in the Magento log files under
/var/log (see how to enable error logging). If you enabled error logging and still can’t see the error, you may find one the log files of your web server. If you’re using a variant of PHP-FPM, make sure to also check the log files of your FastCGI backend.
If the error isn’t logged in any of the above places, using the developer console of your browser. Under the Network tab of the developer console you will see a red network request as shown in the screenshot below indicating a 500 error:
To identify the origin of the error, click on the line. You will see the error under the Response tab of the network request as shown below:
The error may indicate the origin of the error, usually an incompatibility with another module that overrides some part of the checkout process. You can disable modules by moving their XML configuration file from
/app/etc/modules/ into a different directory. Don’t try to disable conflicting modules from the Magento Admin Panel, as it won’t work.
Composer authentication required (repo.magento.com)
If you are installing Composer for the first time, you may see this message in your console before installing the Stripe PHP library. You must provide your Magento 2 marketplace keys.
Failed, partial, and corrupted installations
Some crashes at the checkout page or the Magento Admin Panel may be caused by a partial or corrupted installation, often the result of incorrect filesystem write permissions. To fix a corrupted installation:
- Carefully follow the uninstall instructions.
- Clear your database with the following SQL queries:
DROP TABLE stripe_customers; DELETE FROM setup_module WHERE module = 'StripeIntegration_Payments';
- Check your filesystem permissions before reinstalling. You can fix most problems by changing the ownership of the Magento directories to the user running the web server with:
chown –R <www-username> /magento_directory
Alternatively, you can configure your web server to run as the same user that deploys these files to your website.
- Carefully follow the installation instructions.
The Apple Pay button does not appear
Make sure you’ve followed all steps in the Apple Pay configuration checklist. Some possible reasons for not seeing the Payment Request Button include:
- You may have overwritten the Add to Cart button template in your theme. This is what the default template looks like:
If your payment form looks different, try adding some text to
view/frontend/templates/express/product_button.phtml to see if it appears on the product page. If you don’t see any text, you should customize your theme to integrate the two templates together.
- Make sure you’re serving your page securely using TLS, which is required for the Payment Request Button to appear.
php bin/magento config:set dev/js/enable_js_bundling 0 php bin/magento cache:clean
Order stuck with the Pending status
When an order is initially created, it will have a status of Pending, which indicates that the authorization of the payment by the customer’s bank is still pending. For all redirect-based payment methods, when an authorization occurs, Stripe notifies your website using webhooks. If your orders don’t change from Pending to Processing, this may indicate that webhooks need to be configured for your website.