Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Picking between PayPal and Session/Customer phone number
Total Posts:  45
Joined:  2011-07-13

I have a phone number mandatory for guest and registered purchases however when a customer pays with their PayPal account the delivery details seem to be overwritten by the PayPal details when the order is placed. (and the number the customer entered in checkout is ignored, replaced with blank data)

This is from PayPal API docs:

PayPal returns a contact phone number only if your Merchant Account Profile settings require that the buyer enter one.

As I use the PayPal account for other things I don’t want to make that mandatory in PayPal if I can avoid it.

What I want to do is just before the order (or invoice?) is generated in Magento I want to see if a phone number is passed from PayPal, and if that data is blank I want to use the logging in customer phone, or the guest checkout session array data for the phone number instead.

I know how to do the PHP logic, and can probably work out how to grab the customer or checkout guest data, my problem is I have no idea where to start looking for the code that makes that final save.

Can anyone point me to the right file(s) to start with?


Magento Community Magento Community
Magento Community
Magento Community
Mage Magician
Sr. Member
Total Posts:  98
Joined:  2011-01-12

You can check the paypal payment process code in app\code\core\Mage\Paypal\Model directory. Integrate your logic in model file with overriding it.

All the best!

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top