VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: DOITSolutions on July 26, 2018, 02:03:57 AM

Title: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: DOITSolutions on July 26, 2018, 02:03:57 AM
Hello,

Only payment method published = Paypal standard

When a user generates an order they get an email that the order has been placed. Then when they pay via paypal they get a confirmation email. This email shows the invoice with "Your payment for order 1XXK08 has been confirmed by PayPal" as a note.
However, now every 5-6 hours they then keep getting a new email that their order has been confirmed again, and again.
Also, the shop vendor email address also gets a confirmation email every few hours at the same time, but the shop owners email is not the confirmation email, it is the order placed email, over and over again.
(Is it / paypal looping the order status?

I am not sure what is causing this loop, but this is the only thing stopping me from going live.

The only reference to a similar issue (but different plugin) is here:
https://forum.virtuemart.net/index.php?topic=139404.0
However this was for a different payment plugin and no resolution was found.
This thread states it is likely the payment plugin. I am using the stock standard Paypal standard plugin that comes with Virtuemart. It is on live mode with all API details entered. Payments work well.

I am running:
Joomlla 3.8.7 (very recent)
Virtuemart 3.2.14 (very recent)

Please help.
M.A.
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: Jörgen on July 26, 2018, 06:46:52 AM
Hello

Can You see in the order history that the email has been sent more than one time ? It looks to me like there can be some issue with Your mail server that tries to resend these emails.

Just to make sure, disable ALL payment plugins in Joomla, not only disable in VM back end. Enable only standard payment plugin and a standard payment. Use this and see if the issue persists. If it works without resending emails, please turn on ONLY Paypal plugin and payment.

Are You using some kind of custom template ? If it still isn´t working turn this off and test with Protostar.

regards
Jörgen @ Kreativ Fotografi
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: GJC Web Design on July 26, 2018, 08:36:15 AM
As the emails are triggered by a Status change .. e.g. pending to Confirmed -- unless u can see the status being changed ( in payment history or search your server logs for multiple IPNs from Paypal) I agree with Jörgen.
It seems more likely the mail server resending than VM triggering off multiple mails.
In fact I believe the code was changed in the last year to ignore multiple IPNs unless they made sense .. i.e ignoring attempts to reset the the same status etc
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: AH on July 26, 2018, 11:04:24 AM
Check any VM paypal logs

See if multiple IPN messages have been received

Emails are sent once per change in status (for a status that requires an email)

So it is unlikely to be VM and more likely to be your server




Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: DOITSolutions on July 26, 2018, 16:38:01 PM
Thank you for your replies,

Thus did not occur with the virtuemart standard plugin.
i will check the logs and investigate further tomorrow.

Looking at the payment plugin settings for paypal standard, it might have to do with the status set for completion (keeps emailing until the shop admin marks the order as confirmed). let me test this also and get back to you.
Thanks,
M.A.
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: GJC Web Design on July 26, 2018, 17:31:52 PM
the status should be complete when the IPN is received from Paypal

all PP gets back is a 200 response  -- if the response is something else then it will keep retrying but this will all be in your PP IPN log

https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history&nav=0.3.5
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: DOITSolutions on July 27, 2018, 09:35:07 AM
Tried this:
Changing the status of these orders to confirmed changes nothing.

Problem still occurring:
I still get an email twice a day to the admin and the user.

Quote
"So it is unlikely to be VM and more likely to be your server"
Quote
"It seems more likely the mail server resending than VM triggering off multiple mails"

Why would a server resend emails without software prompting it to? This is strange to assume as a likely cause. I am interested in ruling this out, but I don't even know where to start. I am running CPanel (WHM) on a dedicated CentOs 7 server.

Quote
the status should be complete when the IPN is received from Paypal
all PP gets back is a 200 response  -- if the response is something else then it will keep retrying but this will all be in your PP IPN log
https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history&nav=0.3.5

OK, I will check that IPN log out. But lets say the response is something else, what causes that? What does it keep retrying? the email confirmation? I will have more info on the logs soon, hopefully this will shed some light.

Doing this next:
I am going to get the website owner to follow that paypal IPN log link and let me know what it shows.
I have also turned on logging to file to see if I can find any clues that way.





Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: AH on July 27, 2018, 10:01:11 AM
If the status of an order does not change - ie order is status of confirmed and an IPN message tries to "set"  confirmed - you should not get another email regardless of how many IPN messages

Emails should only be automatically sent when changing from one status to another - and when the new status is configured to send an email
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: Jörgen on July 27, 2018, 11:21:12 AM
Just to make sure, this is the VM standard Paypal plugin You are using no other downloaded version ?
What does the order history show when You look in the back end or at the user account ?
Are there a number of status updates shown or are there none?

Jörgen @ Kreativ Fotografi
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: DOITSolutions on July 29, 2018, 20:47:07 PM
1) This is definitely the Paypal Standard plugin that came with Virtuemart 3.2.14
2) When I open the order, there are only the 4 status changes I made. I received an email when making these status changes ok.

Interesting:
I noticed that when I scroll down on the order in the back end, The right half of the page is headed
"Payment Method"

Then this
Date   2018-07-25 03:58:39
Payment Name   Paypal / Credit CardPay with your Paypal account or use your credit card.
Total   0.01000 AUD

Then it shows what looks like a repeated entry for every email I have been bugged with!
I will paste it here in a code field:

Date 2018-07-25 04:01:16
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 04:02:05
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 04:03:32
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 04:06:18
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 04:11:43
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 04:22:41
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 04:44:07
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 05:26:55
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 06:52:24
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 09:43:13
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-25 15:24:37
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-26 02:47:27
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-27 01:32:54
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-28 01:33:04
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log
Date 2018-07-29 01:33:11
Transaction identification number 61Y49600UY210554Y
Unique customer ID 62FJBZSYY9CXN
Payer status unverified
Payment type instant
Full amount of the customer's payment 0.01
Transaction fee 0.01
Currency AUD
Payment Status Completed (The payment has been completed, and the funds have been added successfully to your account balance.)
Eligibility Ineligible (Merchant is not protected under the Seller Protection Policy.)
View transaction log


Why is this payment method repeating indefinitely?

Paypal logs:
I do not have access to the client's paypal account to check the logs on that side, until I next see him, but I want to solve this to present it working when I next see him.
Look, lets assume that paypal is sending some sort of code every 10-12 hours. What can I do?

Any insight would be much appreciated.
M.A.




Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: Jörgen on July 29, 2018, 21:17:22 PM
QuoteDate   2018-07-25 04:02:05
Transaction identification number   61Y49600UY210554Y
Unique customer ID   62FJBZSYY9CXN
Payer status   unverified
Payment type   instant
Full amount of the customer's payment   0.01
Transaction fee   0.01
Currency   AUD

Why is the order only 0.01 AUD ?

You must have some issue with the order total ??

What is the first entry ?  Is this also 0.01 AUD ?
The transactions tell US every minute a transaction right ? Then it slowes down an makes bigger intervals.
I can see a probem for Paypal to send 0.01 AUD and taking away 0.01 AUD. This does not compute, maybe therefore the resending ??

Do we see the first entry ? if that is the case this is an abnormal order, should be more than 0.01 AUD to work I guess.
This is probably the reason for the infinite loop !!!!

The first entry should refelct the total order sum, why doesn´t it do that ?
Check You currency settings and order totals. Don let this kind of total get through.

regards

Jörgen @ Kreativ Fotografi

Jörgen

Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: DOITSolutions on July 29, 2018, 21:36:30 PM
This is a test order. It contains one product with a price of 1 cent.

I have put through another order with one product with a price of 20 cents.

The same problem happens, one email every minute for the first 5 minutes or so then slows down.

I will next try a $3 payment.
Paypal should be able to accept payment of 20 cents though!
I do not think this is the issue. I am running out of things to try.
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: DOITSolutions on July 29, 2018, 21:40:21 PM
I have now even tried it with a $3.20 payment...

The exact same problem every time. Please don't give up on this issue. What could cause so many emails to go out? The payment plugin and or paypal are definitely looping here.
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: DOITSolutions on July 29, 2018, 22:14:40 PM
New info:

I am not sure, but maybe, I think this might onyl be happening when the site is marked "offline" and I am logged into the offline mode site to test it.
Maybe Paypal doesn't get responses from teh site when it is offline, so it keeps trying?
This might be it... I'll let you know if the problem returns, I am reverting all my crazy settings for testing now.

(Is it meant to do that?)

M.A.
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: Jörgen on July 29, 2018, 23:35:47 PM
Testing the site offline sounds like a bad thing to do. As you have already seen there are things that break and I can not imagine that the Ipn communication was designed to handle this scenario. Testing the site with Paypal in sandbox mode had it's quirks. At the end off the day live testing on a live site has to be done to verify that everything works as expected.
Try to test this under more realistic circumstances.

Jörgen @ Kreativ Fotografi
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: Studio 42 on July 30, 2018, 00:24:56 AM
I can only say :
Bad test = unknow behavior
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: GJC Web Design on July 30, 2018, 10:37:28 AM
Just to add -- I use a 1 cent test products all the time on live sites / live paypal .. never a problem

but site offline surely will break the ipn...

I do all my finally paypal tests totally live with a real payment ( 1 cent) - imho the only true test before hand over
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: AH on July 30, 2018, 10:42:45 AM
As I said earlier

If the order status is set to confirmed and an IPN happens for the same status - a second email should not be triggered via VM

You should see only 2 statuses in the VM order - the payment display is not the same as the status change display!

Pending
Confirmed

If you then have changed to a "final status"

Pending
Confirmed
Shipped

A delayed IPN will set back to confirmed

Pending
Confirmed
Shipped
Confirmed


Setting a test with a site that is then switched to offline is not a good test.

Testing in sandbox should work if you know what you are doing with PayPal and sandbox - but there can be quirks
Testing a site with a .01 cent and "live paypal" test is best case.

The log is also showing a problem at some point you should see the status of the order being changed due to IPN message being received - this is not in your log e.g.:

DEBUG plgVmOnPaymentNotification: plgVmOnPaymentNotification order_number:53K203 new_status:C


Therefore I can only conclude that VM is not setting a status via VM's paypal plugin in response to PayPal's  IPN notifications
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: DOITSolutions on July 31, 2018, 08:04:42 AM
Thanks. I figured that Joomla "Site Offline" mode wasn't really offline, just redirected users to a login and only let in registered super admins (Or regular users too as we have configured it in the settings).

But, it looks like that is the cause for us. Testing with live paypal in offline mode is how I have always done it in the past (although it has bee a few years / versions since I last did this).

Happy to test in live scenarios only from now to be safe. The Paypal IPN must be having a hard time with it.

Cheers, thanks for your time on this.
M.A.

Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: GJC Web Design on July 31, 2018, 10:00:51 AM
QuoteJoomla "Site Offline" mode wasn't really offline, just redirected users to a login and only let in registered super admins

the IPN is sent to a normal view so this would treated the same as above
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: ocram44 on February 01, 2023, 10:49:50 AM
Quote from: AH on July 30, 2018, 10:42:45 AM

The log is also showing a problem at some point you should see the status of the order being changed due to IPN message being received - this is not in your log e.g.:

DEBUG plgVmOnPaymentNotification: plgVmOnPaymentNotification order_number:53K203 new_status:C


Therefore I can only conclude that VM is not setting a status via VM's paypal plugin in response to PayPal's  IPN notifications

I encountered the same problem. Paypal is sending repeatedly IPN notifications. I set the status of the order manually to completed. But after a new PayPal IPN notification the status of the order is a again Confirmed. Did somebody find a solution with this issue in the meantime?
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: ssc3 on February 01, 2023, 10:56:59 AM
Quote from: ocram44 on February 01, 2023, 10:49:50 AM
I encountered the same problem. Paypal is sending repeatedly IPN notifications. I set the status of the order manually to completed. But after a new PayPal IPN notification the status of the order is a again Confirmed. Did somebody find a solution with this issue in the meantime?

One solution is to try a new alternative PayPal Checkout plugin. It can process PayPal payments with out using IPN's. It is a more uptodate version of PayPal, which uses webhooks, which are PayPal's replacement for IPN's.

https://plugins.online-store.co.uk/virtuemart-paypal-checkout.html
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: Darko F. on February 15, 2023, 10:38:01 AM
Didn't test it.
Maybe work
https://forum.virtuemart.net/index.php?topic=148961.msg534143#msg534143
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: dudley389 on March 11, 2023, 00:35:08 AM
I am having this issue with VM 4 and Joomla 4.

Confirmed orders are sending invoice and vendor notifications over and over.

Is there any fix for this.?

thanks
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: jenkinhill on March 11, 2023, 10:48:33 AM
See
http://forum.virtuemart.net/index.php?topic=140629.msg534139#msg534139
http://forum.virtuemart.net/index.php?topic=149465.msg533991#msg533991
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: cristina on April 13, 2023, 18:19:54 PM
I face the same problem since I update to J4 and VM4.
I never had the problem before.
I think it's a bug somewhere in the PayPal plugin, because today I received a notification from PayPal:
"check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:
https://www.collectoravenue.it/index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang="

It should be fixed asap
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: jenkinhill on April 13, 2023, 18:39:31 PM
PayPal have made changes which are causing errors for some users and are telling users in some countries to start using the Braintree payment processing platform - without explaining what or why. Paypal/Braintree info from PayPal is on https://developer.paypal.com/braintree/articles/get-started/overview

A completely new PP plugin will be released in due course, subject to development time. In the meantime, there are solutions in this thread.
A simple step is to turn off Check IPN provider IP in OP plugin configuration, or maybe use the alternative plugin from ssc3.

Problems with PayPal over the years caused me to switch all my clients over to use Stripe for card processing.
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: T.A. Garrison, LLC on May 02, 2023, 02:13:00 AM
Jenkinhill - are you saying VM is "currently" working on updating / creating a "new" plugin?

I've been having this issues for months!

I'm using VM 4.0.12 in the site with the issue. I'm going to update to VM 4.0.16 which I just downloaded and see if that works.
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: jenkinhill on May 02, 2023, 11:38:44 AM
Quote from: T.A. Garrison, LLC on May 02, 2023, 02:13:00 AM
Jenkinhill - are you saying VM is "currently" working on updating / creating a "new" plugin?

I believe so, but it won't be quick as PayPal is making more changes to their own system. I don't have any PayPal-using sites now, but never had issues with plugins from Online Store.  https://plugins.online-store.co.uk/virtuemart-paypal-checkout.html
Title: Re: Order confirmation emails resending every few hours - Paypal standard plugin
Post by: T.A. Garrison, LLC on May 04, 2023, 02:09:07 AM
Thank you, Jenkinhill. I've downloaded and will give it a test.