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

#   Payment notification no more sent in paymentplugin.php

##

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

Less More

- Posts: 15
- Thank you received: 6
-
-

5 years 3 weeks ago [\#336376](#336376) by [institutcalysta](/forum/user/57916-institutcalysta "View institutcalysta's Profile")  *[Payment notification no more sent in paymentplugin.php](/forum/29-payment-methods/903328-payment-notification-no-more-sent-in-paymentplugin-php#336376 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.2  Since I upgraded to Hikashop 4.4.4 no more payment notification mails are sent to the administrator. I traced the problem down to the following code in helpers/paymentplugin.php:  Line 335 triggers a HTTP 500 Internal error.  I am wondering if this might be because initialization of $mailClass is not yet done at this moment. When moving the following line up, the error disappears and mails are sent again:  Full code with the modification:  Could you please check this. Thank you very much.  Best regards")* was created by *[institutcalysta](/forum/user/57916-institutcalysta "View institutcalysta's Profile")*

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.2

Since I upgraded to Hikashop 4.4.4 no more payment notification mails are sent to the administrator.
I traced the problem down to the following code in helpers/paymentplugin.php:
Code:

if(!empty($id)) { $dbOrder = $orderClass-&gt;get($id); $message = str_replace('&lt;br/&gt;', "\r\n", JText::sprintf('PAYMENT_NOTIFICATION_STATUS', $this-&gt;name, $payment_status)) . ' ' . JText::sprintf('ORDER_STATUS_CHANGED', $mail_status) . "\r\n".JText::sprintf('NOTIFICATION_OF_ORDER_ON_WEBSITE', $dbOrder-&gt;order_number, HIKASHOP_LIVE); $orderMail = $orderClass-&gt;loadNotification((int)$id, 'payment_notification', $message); if(empty($orderMail-&gt;mail-&gt;subject)) $orderMail-&gt;mail-&gt;subject = JText::sprintf('PAYMENT_NOTIFICATION_FOR_ORDER', $this-&gt;name, $payment_status, $dbOrder-&gt;order_number); if(HIKASHOP_J30) { $mailClass-&gt;mailer-&gt;addReplyTo($orderMail-&gt;mail-&gt;dst_email, $orderMail-&gt;mail-&gt;dst_name); } else { $mailClass-&gt;mailer-&gt;addReplyTo(array($orderMail-&gt;mail-&gt;dst_email, $orderMail-&gt;mail-&gt;dst_name)); } $orderMail-&gt;mail-&gt;dst_email = $recipients; $orderMail-&gt;mail-&gt;dst_name = ''; $mailClass = hikashop_get('class.mail'); $mailClass-&gt;sendMail($orderMail-&gt;mail); return; }

Line 335 triggers a HTTP 500 Internal error.

I am wondering if this might be because initialization of $mailClass is not yet done at this moment. When moving the following line up, the error disappears and mails are sent again:
Code:

$mailClass = hikashop_get('class.mail');

Full code with the modification:
Code:

if(!empty($id)) { $dbOrder = $orderClass-&gt;get($id); $message = str_replace('&lt;br/&gt;', "\r\n", JText::sprintf('PAYMENT_NOTIFICATION_STATUS', $this-&gt;name, $payment_status)) . ' ' . JText::sprintf('ORDER_STATUS_CHANGED', $mail_status) . "\r\n".JText::sprintf('NOTIFICATION_OF_ORDER_ON_WEBSITE', $dbOrder-&gt;order_number, HIKASHOP_LIVE); $orderMail = $orderClass-&gt;loadNotification((int)$id, 'payment_notification', $message); if(empty($orderMail-&gt;mail-&gt;subject)) $orderMail-&gt;mail-&gt;subject = JText::sprintf('PAYMENT_NOTIFICATION_FOR_ORDER', $this-&gt;name, $payment_status, $dbOrder-&gt;order_number); $mailClass = hikashop_get('class.mail'); if(HIKASHOP_J30) { $mailClass-&gt;mailer-&gt;addReplyTo($orderMail-&gt;mail-&gt;dst_email, $orderMail-&gt;mail-&gt;dst_name); } else { $mailClass-&gt;mailer-&gt;addReplyTo(array($orderMail-&gt;mail-&gt;dst_email, $orderMail-&gt;mail-&gt;dst_name)); } $orderMail-&gt;mail-&gt;dst_email = $recipients; $orderMail-&gt;mail-&gt;dst_name = ''; $mailClass-&gt;sendMail($orderMail-&gt;mail); return; }

Could you please check this. Thank you very much.

Best regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDMzMjgtcGF5bWVudC1ub3RpZmljYXRpb24tbm8tbW9yZS1zZW50LWluLXBheW1lbnRwbHVnaW4tcGhwP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14293
-
-

5 years 3 weeks ago [\#336377](#336377) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Payment notification no more sent in paymentplugin.php](/forum/29-payment-methods/903328-payment-notification-no-more-sent-in-paymentplugin-php#336377 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.2  Since I upgraded to Hikashop 4.4.4 no more payment notification mails are sent to the administrator. I traced the problem down to the following code in helpers/paymentplugin.php:  Line 335 triggers a HTTP 500 Internal error.  I am wondering if this might be because initialization of $mailClass is not yet done at this moment. When moving the following line up, the error disappears and mails are sent again:  Full code with the modification:  Could you please check this. Thank you very much.  Best regards")*

Hi,

Yes, this was fixed on our end last week as a hot patch.
If you download again the install package of HikaShop on our website and install it on yours, you'll get the patch automatically.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDMzMjgtcGF5bWVudC1ub3RpZmljYXRpb24tbm8tbW9yZS1zZW50LWluLXBheW1lbnRwbHVnaW4tcGhwP3RtcGw9bWFya2Rvd24=) 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.048 seconds

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