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

#   onPaymentNotification method

##

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile") Topic Author
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

11 years 10 months ago -  11 years 10 months ago [\#186380](#186380) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[onPaymentNotification method](/forum/29-payment-methods/874004-onpaymentnotification-method?start=20#186380 "Hi Dear I created new custom payment plugin and my bank work with curl I can Successfully redirect to my bank and Successfully payment but when callback from bank to my site only back to this link: index.php?option=com&#95;hikashop and not change my order status only show default status in my order list my transaction add in my bank Successfully but in my site no change status to confirm I think onPaymentNotification problem with curl method and I am using curl for verify my payment. this is my onPaymentNotification method:  I checked my order report from backend and it's empty. Please help me thank you.")*

Sorry dear Nicolas I want to send a notification Email on my developing payment plugin. In my Plugin when verify my payment I want send in notification Email bank transaction id to my customer but I cann't send transaction id with payment notification Email
I'm using this code in verify part and it's not work Code:

$email-&gt;body = JText::sprintf("Hello,\r\n Payment received with bank transaction id:".$transaction_id)."\r\n\r\n".$order_text;

I'm attach my email picture only send this email when verify my payments

- [ ![hika&#95;payment.png](/forum/attachment/21673) ](/forum/attachment/21673 "hika&#95;payment.png") [ ](/forum/attachment/21673?download=1 "hika&#95;payment.png")

Last edit: 11 years 10 months ago by [kaya](/forum/user/25605-kaya "View kaya's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzQwMDQtb25wYXltZW50bm90aWZpY2F0aW9uLW1ldGhvZD9zdGFydD0yMCZ0bXBsPW1hcmtkb3du) 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: 86561
- Thank you received: 14307
-
-

11 years 10 months ago [\#186396](#186396) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[onPaymentNotification method](/forum/29-payment-methods/874004-onpaymentnotification-method?start=20#186396 "Hi Dear I created new custom payment plugin and my bank work with curl I can Successfully redirect to my bank and Successfully payment but when callback from bank to my site only back to this link: index.php?option=com&#95;hikashop and not change my order status only show default status in my order list my transaction add in my bank Successfully but in my site no change status to confirm I think onPaymentNotification problem with curl method and I am using curl for verify my payment. this is my onPaymentNotification method:  I checked my order report from backend and it's empty. Please help me thank you.")*

Hi,

Ok, that's better ![:)](/media/kunena/emoticons/3.png ":)")

So, first, the code Code:

$email-&gt;body = JText::sprintf("Hello,\r\n Payment received with bank transaction id:".$transaction_id)."\r\n\r\n".$order_text;

that you have in your payment plugin is to send a payment notification to the shop owner, not the user, so add the transaction_id there won't make it appear on the email for the customer.

Second, the screenshot in your last message comes from the order creation notification which is sent at the end of the checkout process, before the user is redirected to the payment gateway and enter his credit card. So it is impossible to add the transaction id in that email since when that email is sent, no transaction has yet been done.

A second email is normally sent by the system when the order is confirmed by the payment plugin when it receives the payment notification from the payment gateway, but only if you set the $history parameter of the modifyOrder function to true and that the payment notification is actually received by your payment plugin.
So in that case, you would actually need to modify the code of the email via the menu System&gt;Emails to display the transaction id and not modify the code of your payment plugin.
So for example, you would add such code in the email HTML version:
&lt;?php echo $_POST; ?&gt;
supposing that your payment gateway set the transaction id in a transaction_id parameter of the POST request sent to your server for the payment notification (probably something else, I'm just providing an example here).

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

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