Inhalte aufrufen

Profilbild

Paypal Standard intetmittently not sending emails


10 Antworten zu diesem Thema

#1 nickh

nickh

    Advanced Member

  • Members
  • 80 Beiträge

Geschrieben: 03 April 2018 - 23:13

I've noticed that the customer and admin emails to confirm the successful completion of a payment using the Paypal Standard gateway are occasionally not sent.  Looking through the order notes I can see that this seems to happen whenever the Paypal IPN response is logged before the PDT.  When PDT is first, I can see an order note entry for "'Order placed' email (to customer) has been queued. Queued email identifier:xxxxx", but this does not appear when IPN is first.

 

Looking at my Paypal gateway settings, it has the following configuration:

 

PDT identity token is populated.

"Enable IPN" is ticked.

"Ipn Changes Payment Status" is ticked.  <-- What does this actually do if not ticked?

"IPN handler" is left empty.

 

I'm using Smartstore version 2.5.

 

Is this a known issue, or is my configuration incorrect?

 

Thanks,

Nick


  • Stephennuh, GalenKa und RidgeOi gefällt das

#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3245 Beiträge

Geschrieben: 04 April 2018 - 09:56

I can't reproduce it like that. There is no direct relationship between the customer notification and PDT or IPN. The notification is created earlier, even before redirecting to PayPal and the payment process.
 
"Ipn Changes Payment Status" updates the payment status according to the data transmitted by the IPN. So your configuration is correct.

  • RidgeOi gefällt das

Schöne Grüße aus Düsseldorf,
Marcus Gesing


#3 nickh

nickh

    Advanced Member

  • Members
  • 80 Beiträge

Geschrieben: 04 April 2018 - 21:09

There's definitely a problem here (well, at least with my code base).  The following screenshots show the difference between a correct order (where the customer is sent an "order placed" email, and when this step is missing:

 

 
CORRECT:
 
Working_Payment.png
 
BROKEN:
 
Broken_Payment.png
 
Are you sure that this isn't related to the IPN/PDT callback from Paypal?
 
Thanks,
Nick


#4 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3245 Beiträge

Geschrieben: 04 April 2018 - 23:18

Yes. The screenshot shows a missing order note but what about the email? Is it missing under System > Message Queue too?


Schöne Grüße aus Düsseldorf,
Marcus Gesing


#5 nickh

nickh

    Advanced Member

  • Members
  • 80 Beiträge

Geschrieben: 04 April 2018 - 23:30

There is no queued message listed around the time that the order was marked as "Processing"...


  • sweetnothing gefällt das

#6 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3245 Beiträge

Geschrieben: 04 April 2018 - 23:39

Are there log entries about errors related to this?


Schöne Grüße aus Düsseldorf,
Marcus Gesing


#7 nickh

nickh

    Advanced Member

  • Members
  • 80 Beiträge

Geschrieben: 06 April 2018 - 11:46

Are there log entries about errors related to this?

 

Sadly not...



#8 nickh

nickh

    Advanced Member

  • Members
  • 80 Beiträge

Geschrieben: 10 April 2018 - 22:56

Please could you shed some more light on this problem?  It is still occurring and there are no entries in the logs to suggest what is causing it.

 

I've had a look through the code and found this:

try
                            {
                                _workflowMessageService.SendOrderPlacedStoreOwnerNotification(order, 1);
                                int orderPlacedCustomerNotificationQueuedEmailId = _workflowMessageService.SendOrderPlacedCustomerNotification(order, order.CustomerLanguageId);
                                if (orderPlacedCustomerNotificationQueuedEmailId > 0)
                                {
                                    order.OrderNotes.Add(new OrderNote()
                                    {
                                        Note = string.Format("'Order placed' email (to customer) has been queued. Queued email identifier: {0}", orderPlacedCustomerNotificationQueuedEmailId),
                                        DisplayToCustomer = false,
                                        CreatedOnUtc = DateTime.UtcNow
                                    });
                                    OrderService.UpdateOrder(order);
                                }
                            }
                            catch
                            {
                                //Do nothing - only required for testing of PayPal email notifcations
                            }

Since nothing is happening in the catch, it seems like it is silently failing.

 

Do you know which line in the try block is likely to be causing the intermittent failure?



#9 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3245 Beiträge

Geschrieben: 11 April 2018 - 11:28

Why don't you just log the exception in the catch block? Then you exactly know the reason.


Schöne Grüße aus Düsseldorf,
Marcus Gesing


#10 nickh

nickh

    Advanced Member

  • Members
  • 80 Beiträge

Geschrieben: 11 April 2018 - 13:24

Because that obviously requires a non-functional code change and re-release.  Surely having empty catch blocks in a commercial product isn't a good idea anyway...?!



#11 nickh

nickh

    Advanced Member

  • Members
  • 80 Beiträge

Geschrieben: 11 April 2018 - 13:35

In addition to this, I now believe that the issue only happens when the custom checks out as a guest.

 

Edit: I've now disproved this theory.  I'm still fairly confident that problem only happens when the IPN callback is first.





Auf dieses Thema antworten