News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Multiple emails for same order

Started by MKI-Miro, January 13, 2023, 13:57:41 PM

Previous topic - Next topic

MKI-Miro

Hi

after upgrade Virtuemart 3->4.0.12 and also Joomla (4.2.6) we recieve multiple same emails for order.

Any tip where to search for problem?

Thank you

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

MKI-Miro

nothing helped :(

how can I check if my (default) IPN address works?

MKI-Miro

I just recieved information from PayPal:

check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:


https://www.tiens-usa.com/index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang= https://www.tiens-usa.com/index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=en-US

when I try to open this url, its blanks

Any suggestions?

GJC Web Design

it should be blank .. it is just a notification ..

Request URL: https://www.tiens-usa.com/index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=en-US
Request Method: GET
Status Code: 200
Remote Address: 37.9.175.155:443

it is a 200 so no error .. but the url should contain more info like pm=2&on=123456 etc so the vmplg knows what to do with it...

maybe it errors when that data is sent?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

MKI-Miro

I the code I can see this (also same in most recent virtuemart code)



$post_variables['return'] = JURI::root() . 'index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=' . $this->order['details']['BT']->order_number . '&pm=' . $this->order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . vRequest::getInt('Itemid') . $lang;
$post_variables['notify_url'] = JURI::root() . 'index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component' . '&lang=' . vRequest::getCmd('lang', '');
$post_variables['cancel_return'] = JURI::root() . 'index.php?option=com_virtuemart&view=vmplg&task=pluginUserPaymentCancel&on=' . $this->order['details']['BT']->order_number . '&pm=' . $this->order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . vRequest::getInt('Itemid') . '&lang=' . vRequest::getCmd('lang', '');


Alexb65

#6
While trying to understand the reason behind this here is a really dirty hack to stop multiple notificatiions if order is already in Accetpetd (C) state.

In paypal.php



function plgVmOnPaymentResponseReceived(&$html) {

....

691                 // if status is already acceted then exit : dirty hack to multiple email
692                 if ($order['status'] =="C") {
693                         return;
694                 }



this simply ignores further notifications from paypal if the order is already accepted

Not clean (we should not need this) but just works for now

MKI-Miro

This is extremly weird that nobody has solution for this problem. The only solution I have found is to install another plugin.

MKI-Miro

What i just found in logs:


[php:warn] [pid 5711] [client 173.0.81.140:58016] PHP Warning:  Undefined array key "txn_type" in /data/8/c/8cebda2e-e64f-4f2a-9ed5-25033aa98354/tiens-usa.com/web/plugins/vmpayment/paypal/paypal/helpers/paypal.php on line 463

[php:warn] [pid 19116] [client 173.0.81.65:40750] PHP Warning:  Attempt to read property "txn_id" on int in /data/8/c/8cebda2e-e64f-4f2a-9ed5-25033aa98354/tiens-usa.com/web/plugins/vmpayment/paypal/paypal/helpers/paypal.php on line 707