Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento PayPal Requested and configured merchant emails do not match

Tags:

magento

paypal

Magento is periodically logging the following error.

ERR (3): exception 'Exception' with message 'Requested and configured [email protected] merchant emails do not match.' in /home/user/public_html/app/code/core/Mage/Paypal/Model/Ipn.php:257

Based on my reading of the code:

  • The "configured merchant email" comes from the Magento configuration
  • The empty "Requested merchant email" comes from the receiver_email
    field in the PayPal IPN message.

Why would the IPN message have an empty receiver_email field? I can make several guesses:

  1. Protocol error from PayPal's service.
  2. Configuration error in the PayPal.com account.
  3. Magento bug resulting in empty or corrupt data.
  4. Network problem resulting in empty or corrupt data.

Which is more likely, and how can I narrow it down?


It appears to be related to an adjustment transaction. A few odd things:

  1. The referenced order was paid by credit card, not Paypal Express.
  2. The referenced order was adjusted months ago.
  3. This latest transaction is missing from the order comment history.

I suspect this is a code or protocol error. The transaction POST data is below with identifiers obscured to protect the innocent.

Array
(
    [txn_type] => adjustment
    [payment_date] => 12:17:03 Jul 20, 2015 PDT
    [payment_gross] => -64.45
    [mc_currency] => USD
    [verify_sign] => ...
    [payer_status] => verified
    [payer_email] => [email protected]
    [txn_id] => ...
    [parent_txn_id] => ...
    [payer_id] => ...
    [invoice] => 123456789
    [reason_code] => chargeback_settlement
    [payment_status] => Completed
    [payment_fee] => -20.00
    [mc_gross] => -64.45
    [charset] => windows-1252
    [notify_version] => 3.8
    [ipn_track_id] => ...
)
like image 814
user5120200 Avatar asked Jul 15 '15 16:07

user5120200


1 Answers

In my case the issue was the configured email was not the primary email set on my paypal account. So, paypal was sending the default email account (which was different) as the requested email. After setting the configured email as the primary email address in paypal the issue seems to have been fixed.

like image 53
thephpx Avatar answered Sep 27 '22 20:09

thephpx