This issue is in response to #2714123: The status of the order paid through PayPal stays "Checkout: Review".

Essentially: if a store owner who uses PayPal changes their Primary e-mail address in their PayPal business settings, but does not change the email address used to receive payments in Commerce's configuration rule for that payment method, the end result is the user being kicked back to Checkout: Review with no error message. A log is entered into Watchdog, but without the site admin checking these on a regular basis, the problem could go unnoticed.

Attached is a patch which simply displays an error to the user, and prompts them to notify the store administrator. This way, the admin can be prompted about the issue and reconfigure their store settings so they can begin accepting PayPal payments again.

Comments

torgosPizza created an issue. See original summary.

mglaman’s picture

+++ b/modules/wps/commerce_paypal_wps.module
@@ -244,6 +244,10 @@ function commerce_paypal_wps_paypal_ipn_validate($order, $payment_method, $ipn)
+    drupal_set_message(t('There was a problem communicating with PayPal. Error: invalid receiver address. Please notify the store administrator at :email.',
+      array(':email' => commerce_email_from())), 'error');

I don't like showing somethig this verbose to a customer. I think the watchdog should be bumped from NOTICE to error.

    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);
mglaman’s picture

StatusFileSize
new1020 bytes

Updated patch which boosts the log level for this IPN failure.

mglaman’s picture

Status: Needs review » Needs work

Actually, this is a configuration issue. We should just improve the form to better notify the admin when settings are changed. If the business email is not in the receivers email list, we should display an error.

tomtech’s picture

Status: Needs work » 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.