Forums / Built-in Shipping and Payment Modules / Wrong phone number appearing in Paypal Credit Card Payment

Wrong phone number appearing in Paypal Credit Card Payment

Locked

Started by mike1969 on 2 May 2008, 8:32 PM · Views: 4,666

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
2 May 2008, 8:32 PM
#1
mike1969 avatar

mike1969

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Wrong phone number appearing in Paypal Credit Card Payment

When placing an order in zencart 1.37 and choosing pay by paypal (ipn) without a paypal account a screen appears where you enter your credit card details and some of the fields are already filled in, but the telephone number is not appearing as it should do, i.e at the beginning of the number a '+' is placed and then a break between the 3rd and 4th number and then the last 5 digits are missing, Example 07908747105 is shown as +079 087
The problem is the customer enters the credit card details correctly and because the phone number is not correct a blank paypal screen appears from which you have no option to go forward or back to the previouse page - I have tried to enter the card details and altered the phone number to the correct one and the order goes through fine, also if I don't put no number in at all and try to make payment the order will not go through, but at least you are directed to a screen asking for the correct phone number - which is better than just being directed to a blank page.
So basically I think zencart is some how sending the wrong info to paypal.
Any help would be much appreciated.

3 May 2008, 10:04 AM
#2
chuck avatar

chuck

Totally Zenned

Join Date:
Jul 2005
Posts:
255
Plugin Contributions:
0

Re: Wrong phone number appearing in Paypal Credit Card Payment

I recall seeing something about different phone number formats for different countries being a problem depending on which country your paypal account is located in.

I also recall that some changes were discussed on the forum and built-in to 1.3.8. I haven't run into the problem personally, so I'm only reflecting on things I think I read. Maybe trying out a 1.3.8 test shop might prove the fix for you?

4 May 2008, 2:07 PM
#3
mike1969 avatar

mike1969

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: Wrong phone number appearing in Paypal Credit Card Payment

Thanks for the info Chuck, I don't really want to upgrade to Zencart 1.3.8 at the moment as everything else seems to be working fine.
I have sort of half got round the problem by commenting out a line that seems to be responsible for sending the wrong telephone number from my customers details in zencart to the pre-filled in boxes in the pay by credit card screen on paypal.
Doing this has caused no telephone number to be sent which leaves the telephone number box on the paypal screen blank - which is better than having the wrong format/length number in as the customer can fill it in themselves and if they don't a screen will then appear telling them to fill in the telephone number allowing them to progress further (as opposed to the blank screen from which there was no way out of, which was caused by the wrong format/lenght of number being sent by zencart caused)
The line that I have commented out is in the paypal.php file on line number 183 and is as follows;
$telephone = preg_replace('/\D/', '', $order->customer['telephone']);
I wonder if by ommiting this line it will cause any other problems or if there is some way of modifying the line so that it sends the correct number to the paypal pay with credit card screen?

5 May 2008, 10:30 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Wrong phone number appearing in Paypal Credit Card Payment

Commenting that line shouldn't cause any other problems.

There was significant discussion about the how-to's of dealing with the various phone number formats elsewhere on the forum between 1.3.6 and the release of 1.3.8. You might find some specifics there. Or you could study the 1.3.8 code and attempt to adapt it ... but be mindful that that section of code was largely refactored in 1.3.8, so may look very different.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

5 May 2008, 10:57 PM
#5
mike1969 avatar

mike1969

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: Wrong phone number appearing in Paypal Credit Card Payment

Thanks for your help DrByte and the assurance that commenting out the line of code shouldn't effect anything else.
The paypal, pay with credit card screen is working ok now and it's just a case of the customer having to enter their own phone number and even if they forget to enter it they are re-directed to a screen which highlights the field they need to fill in.