Resolving Magento 2.4.5-p1 Stripe 3.3.13 Payment Module Iframe Loading Issue

Magento 2.4.5-p1 users might encounter a peculiar issue with the Stripe 3.3.13 payment module related to iframe loading when changing shipment methods. If you’ve faced the error message, “Sorry, this payment method is not available. Please contact us for assistance,” worry not – we have a solution for you.

Problem Description

The issue arises when users switch shipment methods multiple times (typically exceeding 5 to 6 changes). The Stripe payment module’s iframe fails to load or the iframe loaded with an error message, leaving customers stranded with an error message instead of a seamless payment experience.

Identifying the Solution

Upgrading the Stripe payment module from version 3.3.13 to version 3.5.6 is the recommended solution to address this issue. Follow these steps to ensure a smooth transition:

Upgrade the Stripe Payment Module

1. Using Composer

Step 1: Edit the composer.json file:

  • Find the “require” section and update the Stripe module versions: 

  “stripe/module-payments”: “^3.5.6”,

 “stripe/stripe-payments”: “^3.5”,

Step 2: Run the following command to update the dependencies
“composer update”

OR

2. Download from GitHub

Step 1: Access the Stripe Magento 2 Releases GitHub page.(https://github.com/stripe/stripe-magento2-releases)

Step 2: Download the latest release package (ZIP file) of version 3.5.6.

Step 3: Extract the contents of the ZIP file.

Step 4: Copy the extracted files to the respective directories in your Magento installation. Ensure that you overwrite existing files related to the Stripe module.

After the successful stripe module upgrade run magento setup commands.

Read Also: Secure a Magento Store from Card Payment Attacks

Clear Cloudflare Cache (If Applicable)

For users employing Cloudflare’s caching services, it’s crucial to clear the cache after upgrading the Stripe payment module. This ensures that the latest changes take effect and prevents any lingering issues. 

Follow these steps to clear the Cloudflare cache:

  • Log in to your Cloudflare account.
  • Navigate to the caching section.
  • Find and select the option to purge or clear the cache.

Additional Note

In some cases, users might encounter an “initstripe function not defined” issue after deployment. If this occurs, ensure to clear the Cloudflare cache once again.

Conclusion

Upgrading the Stripe payment module to version 3.5.6 resolves the iframe loading issue associated with changing shipment methods in Magento 2.4.5-p1. Whether you opt for the Composer method or manual download, following these steps precisely is important. Additionally, for Cloudflare users, clearing the cache is a crucial post-upgrade step to ensure a seamless payment process for your customers.

By implementing these solutions, you can enhance the performance and reliability of the Stripe payment module, providing a better overall shopping experience for Magento 2 users

About The Author

We take the guesswork out of ecommerce.
Schedule a consultation call today