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.
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?
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?
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.
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.