Jump to content

Order payed with PayPal express without phone number


ItalianBoutiqueShoes

Recommended Posts

I believe you will need to go into your Paypal account profile and configure it so that all customers are required to provide a phone number when they pay using Paypal.

 

That should force Paypal to collect the phone number from the customer, and then send to your store when the order is created

Link to comment
Share on other sites

  • 4 weeks later...

Ok, that is Paypal Europe.

 

Please describe how you are testing this, and where you are looking for the phone number. 

 

Prestashop stores phone numbers in the customers address.  The Paypal Europe module will record the phone number provided by Paypal in the address that has the alias "Paypal_Address".

Link to comment
Share on other sites

  • 10 months later...

Dear Bellini, I have PayPal standard module v.3.10.1 with Presta 1.6.1 The problem is on the shipping address created by the PayPal module. It not set the phone number.

 

I checked the PayPal API log and I found the PAYMENTREQUEST_0_SHIPTOPHONENUM parameter with the phone number.

 

I would like to fix: the module should insert it on the address information. Thanks, Daniele

Link to comment
Share on other sites

  • 2 months later...

Hello, I think I found the solution but after I changed to PayPal Pro and can't check it anymore.

 

Anyway the problem is only on PayPal Express Checkout because when the module insert the phone number check it and, if is not only number, refuse it. So you need to clean it before the Prestashop check. I made it like this:

 

modules/paypal/express_checkout/payment.php

$address->phone = preg_replace('/\D+/', '', $ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM']);

But sometime it happends that this field is empty because PayPal have alredy the phone number on customer details so you need to take it from them if it happend

if (!empty($ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM'])) {
    $address->phone = $ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM'];
}else{
    $address->phone = $ppec->result['PHONENUM'];
}

An other problem can be that the international "+" simble need to be replaced with "00" before the preg_replace

 

As told before I had no time to check all it as, moving on Paypal Pro there is not anymore the Express function so the problem don't happend.

I hope it can help someone fixing the problem.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

Hello, I think I found the solution but after I changed to PayPal Pro and can't check it anymore.

 

Anyway the problem is only on PayPal Express Checkout because when the module insert the phone number check it and, if is not only number, refuse it. So you need to clean it before the Prestashop check. I made it like this:

 

modules/paypal/express_checkout/payment.php

$address->phone = preg_replace('/\D+/', '', $ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM']);

But sometime it happends that this field is empty because PayPal have alredy the phone number on customer details so you need to take it from them if it happend

if (!empty($ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM'])) {
    $address->phone = $ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM'];
}else{
    $address->phone = $ppec->result['PHONENUM'];
}

An other problem can be that the international "+" simble need to be replaced with "00" before the preg_replace

 

As told before I had no time to check all it as, moving on Paypal Pro there is not anymore the Express function so the problem don't happend.

I hope it can help someone fixing the problem.

Hello did this fix the express checkout missing phone number issue??

regards 

Link to comment
Share on other sites

  • 1 year later...
On 2015/11/12 at 4:25 PM, ItalianBoutiqueShoes said:

Hello, I think I found the solution but after I changed to PayPal Pro and can't check it anymore.

 

Anyway the problem is only on PayPal Express Checkout because when the module insert the phone number check it and, if is not only number, refuse it. So you need to clean it before the Prestashop check. I made it like this:

 

modules/paypal/express_checkout/payment.php


$address->phone = preg_replace('/\D+/', '', $ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM']);

But sometime it happends that this field is empty because PayPal have alredy the phone number on customer details so you need to take it from them if it happend


if (!empty($ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM'])) {
    $address->phone = $ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM'];
}else{
    $address->phone = $ppec->result['PHONENUM'];
}

An other problem can be that the international "+" simble need to be replaced with "00" before the preg_replace

 

As told before I had no time to check all it as, moving on Paypal Pro there is not anymore the Express function so the problem don't happend.

I hope it can help someone fixing the problem.

By adding the below,  my problem get fixed. Really appreciated.

else{     $address->phone = $ppec->result['PHONENUM']; }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...