I am using d7.12 and Drupal Commerce 7.x-1.2
Payment worked well for development. Using sandbox and test payments worked fine. However, when switching to live processing of credit cards the problem starts. When the user finishes making a CC payment at paypal and is re-directed back to the site, his order has not been processed. None of the rules have been executed and the user arrives back at the order review page instead of the completion message. Paypal works fine to charge the card, but no order is created pending or completed and the anonymous user hasn't had an account made. When I check the log this is the error i am getting: IPN rejected: invalid receiver e-mail specified (xxxxxxxxxx@xxxx.com).

I have seen many forums dealing with somewhat similar issues but can't find a solution for this. Has anyone experienced this problem? Any help on this would greatly appreciated.

Comments

xturgorex’s picture

Category: bug » feature
Priority: Critical » Normal

I figured out the problem and the solution. WPS was rejecting the IPN because the site e-mail information didn't match the email address provided for the paypal account. So, I guess the module is looking for the recipient of the IPN using [site:mail] ???? The problem now is that I want the two emails to be different. The paypal account is set up with a different e-mail address than the one that is used for administering orders/content. Instead of looking for the site email, perhaps the module should look for the same email provided in the WPS settings when returning to the site. Does anyone want to look at patching this or is there another version of Commerce Paypal coming soon that could support changing the site e-mail and still working? Using the sandbox accomplishes this. Maybe use the same method as sandbox to return the IPN?

xturgorex’s picture

Another update. It broke again immediately after that post. Couldnt figure out what the problem was. I re-installed the paypal module and then reordered the checkout rules so that afix anonymous with an existing account and create a new account happened before changing the order status and confirmation email. also, i set up a new paypal account. changed my webservers mail form, drupal contact form, site e-mail, and wps to all to the same email address and made a new paypal account with that email. That fixed my problem, and I still have no idea where the hangup was.

sonictruth’s picture

I am having the same issue. Everything seems to work fine until I come back from paypal I am taken to checkout/%order_id%/checkout instead of checkout/%order_id%/payment

I also am getting the 'IPN rejected: invalid receiver e-mail specified' message in the logs

I haven't tried any of the steps xturgorex has taken to rectify this but it seems like either a bug or some specific configuration option that I have overlooked.

Any one got any ideas?

sonictruth’s picture

Category: feature » bug

I worked out there was white space at the end of the email address in the Paypal WPS payment config. Deleting it made everything work again. I would roll a patch but I don't have time right now so changing this to bug report.

Prague man’s picture

Please, make form that we can set return url or fix this problem.

to: Posted by sonictruth on May 2, 2012 at 12:50am
I dont have any white space at the end of the email address in the Paypal WPS payment config and bug still here.

Prague man’s picture

My "crazy fix" is in line 164, file commerce_paypal_wps.module change code to:
if ($ipn['receiver_email'] != $payment_method['settings']['business'] && $ipn['receiver_email'] != "yoursecondemail@fromyourpaypalaccount") {

and its work. But still it does not send email about the order correctly :)

Prague man’s picture

There is a problem, after redirecting from Paypal to "checkout/' . $order->order_id . '/complete" the user has permissions at the moment as anonymous (although it is in fact normally logged in) and can not store the email about the order through views (that can be authorized only with the current user). And log IPN writes that it was Anonymous too, where is the problem please?

bjlewis2’s picture

Still have this issue:
Drupal 7.14
Drupal Commerce 7.x-1.3 (2012-May-09)
Commerce PayPal 7.x-1.x-dev (2012-Feb-04)

A user can go through the entire checkout process and pay via paypal (buyer get's an email from PayPal that their transaction is complete, I get an email that I have received a payment, and the money is in my account). However, when the buyer is returned to my site, they are sent to "/checkout/1/reveiw". And when I go to "admin/commerce/orders/carts" the order status is "Checkout: Review". But I have their money...

A look at the log says "IPN rejected: invalid receiver e-mail specified (User@example.com)." (I, of course, used my real email address... I'm not sure if it matters, but I entered the email address as user@example.com, It capitalized it on its own.)

The email address is correct, and there are no white spaces anywhere.

What's most annoying is that it works perfectly when I use sandbox info. I mean 100% perfect. But when I go live, it stops...

Edit (got it working!): Ok, so as I was writing this, I was also trying to debug... guess what! I went back to "admin/commerce/config/payment-methods/manage/commerce_payment_paypal_wps" and entered the email address as "User@example.com" (capitalizing the first letter), and everything works now! Woot!

So, I guess in the short-term, change your email to start with a capitol letter.
In the long-term, the module should probably be updated to accept either a capitol or lowercase email address.

Prague man’s picture

"User@example.com" (capitalizing the first letter) - doesnt work.

joewatkins’s picture

Yep same problem here capitalizing the first letter dint work.

Prague man’s picture

Any solution?

guy_schneerson’s picture

leramulina’s picture

Issue summary: View changes

Have you got any solution? I it already 2016 but I've got the same problem.

leramulina’s picture

Status: Closed (duplicate) » Active
cebab54’s picture

I have this problem, has it been fixed. The issue seems to have been going on for 5 years???

tomtech’s picture

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