[Skip to main content](#vessel-content)

#   Stripe Checkout: thank you page loses the language

##

- **[Alouette00](/forum/user/53482-alouette00 "View Alouette00's Profile")**
- [![Alouette00's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/53482-alouette00 "View Alouette00's Profile") Topic Author
- [ Offline](/forum/user/53482-alouette00)

Less More

- Posts: 47
- Thank you received: 8
-
-

3 weeks 9 hours ago [\#100000575](#100000575) by [Alouette00](/forum/user/53482-alouette00 "View Alouette00's Profile")  *[Stripe Checkout: thank you page loses the language](/forum/29-payment-methods/100000117-stripe-checkout-thank-you-page-loses-the-language#100000575 "-- HikaShop version -- : 6.8.1 -- Joomla version -- : 6.2.0 -- PHP version -- : 8.5.12 -- Browser(s) name and version -- : Safari 605.1  Hello,  On a multilingual Joomla site (Japanese by default, English as second language), a customer who pays with Stripe Checkout from the English pages comes back to the thank you page in Japanese. With the bank transfer method, the thank you page stays in English.  Screenshot 1: bank transfer, ordered from the English pages, the thank you page stays in English (/en/ in the URL). Screenshot 2: Stripe Checkout, ordered from the English pages, the thank you page comes back in Japanese (no language in the URL).  The URLs given to Stripe (success&#95;url and cancel&#95;url in &#95;createCheckoutSession()) and the $endUrl / $cancelUrl of &#95;handleSessionReturn() and &#95;handle3dsReturn() are built as HIKASHOP&#95;LIVE . 'index.php?...' without the language. So the Language Filter plugin of Joomla picks the language from the browser or the default language of the site.  Routing these URLs with the language of the order fixed it on my site. I added this helper:  and used it for $endUrl and $cancelUrl in &#95;handleSessionReturn() and &#95;handle3dsReturn() with $dbOrder-&gt;order&#95;lang, and for $cancelUrl in &#95;createCheckoutSession(). After that, the customer comes back in the language of the order, both after paying and after canceling on the Stripe page.  Versions: Joomla 6.2.0, HikaShop Business 6.8.1, Stripe Checkout 1.5.9, PHP 8.5.12.  Thank you.")* was created by *[Alouette00](/forum/user/53482-alouette00 "View Alouette00's Profile")*

-- HikaShop version -- : 6.8.1
-- Joomla version -- : 6.2.0
-- PHP version -- : 8.5.12
-- Browser(s) name and version -- : Safari 605.1

Hello,

On a multilingual Joomla site (Japanese by default, English as second language), a customer who pays with Stripe Checkout from the English pages comes back to the thank you page in Japanese. With the bank transfer method, the thank you page stays in English.

Screenshot 1: bank transfer, ordered from the English pages, the thank you page stays in English (/en/ in the URL).
Screenshot 2: Stripe Checkout, ordered from the English pages, the thank you page comes back in Japanese (no language in the URL).

The URLs given to Stripe (success_url and cancel_url in _createCheckoutSession()) and the $endUrl / $cancelUrl of _handleSessionReturn() and _handle3dsReturn() are built as HIKASHOP_LIVE . 'index.php?...' without the language. So the Language Filter plugin of Joomla picks the language from the browser or the default language of the site.

Routing these URLs with the language of the order fixed it on my site. I added this helper:
Code:

private function _langUrl($query, $langTag = '') { if(empty($langTag)) $langTag = \Joomla\CMS\Factory::getLanguage()-&gt;getTag(); if(!empty($langTag) &amp;&amp; \Joomla\CMS\Language\Multilanguage::isEnabled()) $query .= '&amp;lang=' . $langTag; return \Joomla\CMS\Router\Route::_($query, false, 0, true); }

and used it for $endUrl and $cancelUrl in _handleSessionReturn() and _handle3dsReturn() with $dbOrder-&gt;order_lang, and for $cancelUrl in _createCheckoutSession(). After that, the customer comes back in the language of the order, both after paying and after canceling on the Stripe page.

Versions: Joomla 6.2.0, HikaShop Business 6.8.1, Stripe Checkout 1.5.9, PHP 8.5.12.

Thank you.  [ ![1&#95;bank&#95;transfer&#95;english.png](/forum/attachment/100000171) ](/forum/attachment/100000171 "...er&#95;english.png")

- [ ![2&#95;stripe&#95;returns&#95;japanese.png](/forum/attachment/100000172) ](/forum/attachment/100000172 "...s&#95;japanese.png") [ ](/forum/attachment/100000172?download=1 "...s&#95;japanese.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy8xMDAwMDAxMTctc3RyaXBlLWNoZWNrb3V0LXRoYW5rLXlvdS1wYWdlLWxvc2VzLXRoZS1sYW5ndWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

3 weeks 1 hour ago [\#100000597](#100000597) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Stripe Checkout: thank you page loses the language](/forum/29-payment-methods/100000117-stripe-checkout-thank-you-page-loses-the-language#100000597 "-- HikaShop version -- : 6.8.1 -- Joomla version -- : 6.2.0 -- PHP version -- : 8.5.12 -- Browser(s) name and version -- : Safari 605.1  Hello,  On a multilingual Joomla site (Japanese by default, English as second language), a customer who pays with Stripe Checkout from the English pages comes back to the thank you page in Japanese. With the bank transfer method, the thank you page stays in English.  Screenshot 1: bank transfer, ordered from the English pages, the thank you page stays in English (/en/ in the URL). Screenshot 2: Stripe Checkout, ordered from the English pages, the thank you page comes back in Japanese (no language in the URL).  The URLs given to Stripe (success&#95;url and cancel&#95;url in &#95;createCheckoutSession()) and the $endUrl / $cancelUrl of &#95;handleSessionReturn() and &#95;handle3dsReturn() are built as HIKASHOP&#95;LIVE . 'index.php?...' without the language. So the Language Filter plugin of Joomla picks the language from the browser or the default language of the site.  Routing these URLs with the language of the order fixed it on my site. I added this helper:  and used it for $endUrl and $cancelUrl in &#95;handleSessionReturn() and &#95;handle3dsReturn() with $dbOrder-&gt;order&#95;lang, and for $cancelUrl in &#95;createCheckoutSession(). After that, the customer comes back in the language of the order, both after paying and after canceling on the Stripe page.  Versions: Joomla 6.2.0, HikaShop Business 6.8.1, Stripe Checkout 1.5.9, PHP 8.5.12.  Thank you.")*

Hi,

The return addresses given to Stripe (after paying and after cancelling on the Stripe page) and the thank you page address the plugin sends the customer to were built without the language, so on a multilingual site Joomla's Language Filter fell back to the browser's or the site's default language. Your analysis was right, thank you for the detailed report.

This is fixed in version 1.5.10 of the Stripe Checkout plugin, available now: Joomla's updater shows it, or you can download it from your account on our website, and install it over your current version (your settings are kept). The customer now comes back in the language they ordered in, on the thank you page after paying and on the cancel page after giving up on the Stripe page.

The update replaces the plugin file, so your own modification goes away with it and is no longer needed.

Plugin page: [ www.hikashop.com/marketplace/product/296-stripe-checkout.html](https://www.hikashop.com/marketplace/product/296-stripe-checkout.html)

The following user(s) said Thank You: [Alouette00](/forum/user/53482-alouette00 "View Alouette00's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy8xMDAwMDAxMTctc3RyaXBlLWNoZWNrb3V0LXRoYW5rLXlvdS1wYWdlLWxvc2VzLXRoZS1sYW5ndWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Alouette00](/forum/user/53482-alouette00 "View Alouette00's Profile")**
- [![Alouette00's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/53482-alouette00 "View Alouette00's Profile") Topic Author
- [ Offline](/forum/user/53482-alouette00)

Less More

- Posts: 47
- Thank you received: 8
-
-

2 weeks 6 days ago [\#100000606](#100000606) by [Alouette00](/forum/user/53482-alouette00 "View Alouette00's Profile")  Replied by *[Alouette00](/forum/user/53482-alouette00 "View Alouette00's Profile")* on topic *[Stripe Checkout: thank you page loses the language](/forum/29-payment-methods/100000117-stripe-checkout-thank-you-page-loses-the-language#100000606 "-- HikaShop version -- : 6.8.1 -- Joomla version -- : 6.2.0 -- PHP version -- : 8.5.12 -- Browser(s) name and version -- : Safari 605.1  Hello,  On a multilingual Joomla site (Japanese by default, English as second language), a customer who pays with Stripe Checkout from the English pages comes back to the thank you page in Japanese. With the bank transfer method, the thank you page stays in English.  Screenshot 1: bank transfer, ordered from the English pages, the thank you page stays in English (/en/ in the URL). Screenshot 2: Stripe Checkout, ordered from the English pages, the thank you page comes back in Japanese (no language in the URL).  The URLs given to Stripe (success&#95;url and cancel&#95;url in &#95;createCheckoutSession()) and the $endUrl / $cancelUrl of &#95;handleSessionReturn() and &#95;handle3dsReturn() are built as HIKASHOP&#95;LIVE . 'index.php?...' without the language. So the Language Filter plugin of Joomla picks the language from the browser or the default language of the site.  Routing these URLs with the language of the order fixed it on my site. I added this helper:  and used it for $endUrl and $cancelUrl in &#95;handleSessionReturn() and &#95;handle3dsReturn() with $dbOrder-&gt;order&#95;lang, and for $cancelUrl in &#95;createCheckoutSession(). After that, the customer comes back in the language of the order, both after paying and after canceling on the Stripe page.  Versions: Joomla 6.2.0, HikaShop Business 6.8.1, Stripe Checkout 1.5.9, PHP 8.5.12.  Thank you.")*

Hi,

Thank you very much for the quick fix and the clear explanation.

I installed version 1.5.10 on my test site, and it works well. After paying and after cancelling on the Stripe page, the customer now comes back in the language of the order. I will update my live shop and remove my own modification.

Thank you again for your support.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy8xMDAwMDAxMTctc3RyaXBlLWNoZWNrb3V0LXRoYW5rLXlvdS1wYWdlLWxvc2VzLXRoZS1sYW5ndWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.046 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
