Hi,

In the commerce_paypal_wps.module file there are 2 lines of code that need to be rearranged.

  if (!in_array(trim(strtolower($ipn['receiver_email'])), $receiver_emails)) {
    commerce_payment_redirect_pane_previous_page($order);
    watchdog('commerce_paypal_wps', 'IPN rejected: invalid receiver e-mail specified (@receiver_email); must match the primary e-mail address on the PayPal account.', array('@receiver_email' => $ipn['receiver_email']), WATCHDOG_NOTICE);
    return FALSE;
  }

Should be:

  if (!in_array(trim(strtolower($ipn['receiver_email'])), $receiver_emails)) {
    watchdog('commerce_paypal_wps', 'IPN rejected: invalid receiver e-mail specified (@receiver_email); must match the primary e-mail address on the PayPal account.', array('@receiver_email' => $ipn['receiver_email']), WATCHDOG_NOTICE);
    commerce_payment_redirect_pane_previous_page($order);
    return FALSE;
  }

Otherwise this wont be logged and the log does not show where the problem relays.

I cannot create patches, so it would be nice if someone else does this.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

harings_rob’s picture

Issue summary: View changes
discipolo’s picture

Status: Needs work » Needs review
StatusFileSize
new1.22 KB

since you requested a patch so nicely, here it is

mglaman’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
anybody’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense and patch works. RTBC!
Nothing will ever be logged after the redirect...

anybody’s picture

Any chance to commit this finally? Any active maintainer?

I guess it's clear that this makes sense as the log line can never be called!

anybody’s picture

Priority: Minor » Normal

Kudos to @discipolo! Created a MR from his patch in #2

anybody’s picture

Any maintainer to review the MR and plan to merge this? I guess it's clear from the code logic that this makes a lot of sense and is safe to be committed?

grevil’s picture

Makes sense! RTBC+1

tomtech’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.