I'm not sure if this is a bug, or expected behavior. I've been trying to understand how Civicrm uses Paypal as a processor by comparing Pro vs Standard and found something unexpected with Paypal Standard.
I have a fresh install of Drupal 7.58 & Civicrm 4.7.31 and went straight to setting up a new Paypal Standard processor with a sandbox account.
User Story: With Paypal Standard, as a new site user and I want to sign up for a membership but want to use a different email to sign into Paypal than I do on the member site; for personal/security reasons.
Problem: When I do this, I'm redirected correctly back to the site and get an 'all is OK' message'. However, I can tell CiviCRM doesn't correctly process the IPN because the transaction stays in 'Pending' even though it responds to PayPal with an HTTP 200 and logs no error.
I can also confirm, that when I use the same email to register (making it my primary email) on Civicrm and payment with Paypal.. the transaction completes and the contact get's their membership fine.
Whats more strange.. if the contact is in the system with 2 emails (primary & billing).. when they use the billing email to pay through Paypal, Civicrm does find the right contact with that email and gives them the membership, but then REWRITES the billing email over the primary email, thus completely loosing the proper primary email for that contact. Isn't this strange?! Should be this happening? Either way, I can see how this could cause havoc with my members when they keep loosing their emails since the sign-up process is meant to be fully self-service with immediate results.
I've only tested this with memberships, so I'm not sure if this same thing would happen if a person is paying for an event.
Has anyone else experience this? If so, what have you done to managing this?