Using Paypal WPS, there are two notifications on each order:

There's an Order comment like: "Payment of 34.50 USD submitted through PayPal."

There's also an Admin comment like: "PayPal IPN reported a payment of 34.50 USD."

I'm not sure why both comments appear. Maybe they're separate phases in the payment processing. I do know, though, that it shouldn't show up in the Order comments. Order comments are for communication between the store administrator and the customer. The customers don't need to see payment transaction updates. These comments also clutter things up and make it more difficult to pinpoint orders that have special instructions from the customers.

Unless there's some special reason for those Paypal Order comments to exist, they should be removed or moved to Admin comments. If there is a special reason for them to exist, there should be a configuration option to turn them off or move them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

This has been noted before but I can't find the issue for it now. We should probably review all uses of order/admin comments in the PayPal module at the same time.

DanZ’s picture

I see #1312056: PayPal payment notifications should be admin comments, not order comments, but that's about the IPN updates, which are fine.

DanZ’s picture

The issue is in uc_paypal_ipn(). It simply creates both comments, one order, then one admin:

        uc_order_comment_save($order_id, 0, t('Payment of @amount @currency submitted through PayPal.', array('@amount' => uc_currency_format($payment_amount, FALSE), '@currency' => $payment_currency)), 'order', 'payment_received');
        uc_order_comment_save($order_id, 0, t('PayPal IPN reported a payment of @amount @currency.', array('@amount' => uc_currency_format($payment_amount, FALSE), '@currency' => $payment_currency)));

Considering that there's already the possibility of sending notifications out via Rules, the first one seems pretty pointless. It should probably just be removed.

Paypal also does stuff with comments in uc_paypal_ec_review_form_submit() and uc_paypal_wpp_charge().

DanZ’s picture

Status: Active » Needs review
FileSize
934 bytes

It's only the one line noted in #3 that is a problem. This patch simply removes it, and that's all that needs to happen here.

longwave’s picture

Status: Needs review » Fixed

Committed to both branches, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Clarified a touch.