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

Duplicate Status Updates for orders using PayPal with multiple matching Emails

Started by alex2311, October 15, 2022, 01:55:45 AM

Previous topic - Next topic

GJC Web Design

It could be something like the IPN call from Paypal to your server doesn't return a 200 so Paypal keeps sending IPNs

is it php version related?  which version? maybe 8+ ?

try and see if there is a 500 error or 403 error etc in the logs for a call of   index.php option=com_virtuemart&view=vmplg&task=notify&tmpl=component
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

alex2311

I ended up taking Kelvyn's advice:
"I don't use PayPal anymore, only Stripe, but when I did use PP it was with a plugin from plugins.online-store.co.uk with no problems."

Installing the basic version of the PayPal version resolved my issue. 

I tried the debugging tool suggested by GJC Web Design but it did not like Joomla 4 (crashed the site) and sent me 450 emails. :-(

Thanks all.

Darko F.

I changed plugin to sandbox and these seems stooping emails fro sending.
I call customer apologise for flooded his email box, and for now I will not touch papal plugin a while.
There in no problem if you fall. Problem is if you don't get up

Milbo

I really wonder about this. You are both on j4? and the problem appears with the plugin of vm and the one of onlinestore? or just with the one of the core?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

alex2311

Hi Milbo,

I can setup a duplicate test site if you wish to look at it in more detail.  At the moment we a re running with a different PayPal plugin which has solve the problem.

Cheers
Alex

Darko F.

Hi
It hapen joomla 3 and core Paypal plugin,
on virtuemart i think : com_virtuemart.4.0.7.10722_package_or_extract.zip

But I don't touch PayPal anymore with none of my shops, even because their 2500€ fine for someone who doesn't agree with their ideological stance. I don't care  what stance they have, and I don't care about politic, I'm just strongly ageist private company fine you for their imaginary reason when they want, In my opinion this is dangerous precedents and there are a loot of others payment processors to choose with better terms and conditions.
There in no problem if you fall. Problem is if you don't get up

p.barg

Hello,

we've ran into the same problem now. Migrated a site from J3/VM3 PHP7.4 to J4/VM4 PHP8.0.
For an order paid with PayPal we get tons of order confirmation (with status "changes" from confirmed to confirmed) and corresponding e-mails (to vendor and customer).
Has anybody found any fix/solution to this by now? Maybe i'ts just a matter of configuration?

Thanks and regards,

Petra

alex2311

Hi Petra,

I didn't find a solution...  As I said above...
QuoteI ended up taking Kelvyn's advice:
"I don't use PayPal anymore, only Stripe, but when I did use PP it was with a plugin from plugins.online-store.co.uk with no problems."

Installing the basic version of the PayPal version resolved my issue.

I tried the debugging tool suggested by GJC Web Design but it did not like Joomla 4 (crashed the site) and sent me 450 emails. :-(

Thanks all.

Out of curosity...  Is it hosted on IIS server?   

Cheers
Alex

p.barg

Hi Alex,

thanks for your reply. The site is hosted on an Apache Server.
In the past I've been using one of the paypal plugins by online-store.co.uk and was quite happy. So I'll probably give that a try.
Do you use the paypal express checkout plugin by them? Or did you give up PayPal completely?

Best regards,

Petra

alex2311

I use:

PayPal Checkout SSC (1.4.17) Free Version

Virtuemart Payment Plugins
PayPal Checkout (New Version) : Use's PayPal's latest SDK to present a range of payment options to your buyers based on their geographical location.

It works well for us!

Alex

PS... I was curious if the fault we were experiencing related to the hosting environment...  It seems to be only occurring to a few of us....

p.barg

I now followed an advise in the German forum (bei Stefan): in the backend of the PayPal plugin set "Successful status restriction via IPN" to "Pending". This way status is only changed once to "confirmed" and only
1 mail gets sent.
What is still missing though is the PayPal transaction details that are normally listed in the payment section of the order.

-- Petra

The link to the German forum thread: https://forum.virtuemart.de/thread/3614-10-gleiche-best%C3%A4tigungsmail-nach-paypal-bezahlung/?postID=18185&highlight=paypal#post18185

alex2311


Alexb65

Hi all

We were plagued with this bug and developed a small fix (Joomla 4.2.6 VM 4.0.12)

The problem has to be catched in function plgVmOnPaymentNotification in file plugins/vmpayments/paypal/paypal.php

Here is the fix to avoid multiple changes in status and notifications only when an order is already in C state (for us C is Confiermed after payment)

[code[
764         function plgVmOnPaymentNotification() {
.....
793                 $order = $orderModel->getOrder($virtuemart_order_id);
    794 /****** FIX multiple notification ****/
    795
    796                 $test = $order['details']['BT'];
    797
    798                 // if order status is already accepted then exit : dirty hack to multiple email
    799                 error_log(__FILE__ ." " . __LINE__ . " order  $order_number status  " . $test->order_status .
    800                                 " PAYPAL status = " . $paypal_data['payment_status']
    801                                 );
    802                 if ( $paypal_data['payment_status'] === "Completed" &&
    803                         $test->order_status ==="C") {
    804                         error_log ("spurious paypal notification discarded for order ID $order_number");
    805                         return false;
    806                 }
    807
    808 /************ END FIX *********************/
   809
810                 $this->_currentMethod->payment_currency = $this->getPaymentCurrency($this->_currentMethod,$order['details']['BT']->payment_currency_id);

[/code}

You may avoid the error_log part if not interested

Hope this helps

p.barg

Hello all,

can someone from the devs confirm that these PayPal problems are resolved in the current VM version (4.0.20)?
I just want to make that sure, before I update any further customer sites...

Petra