Payment Method : PayPalSmartPaymentButtons

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
I encountered the same phone error last week.  PayPal expects it to be strictly numeric without special characters like dash or plus (there's a Regex sample somewhere in their documentation that I fail to find at the moment), so I edited ServiceManager.cs in the plugin like this to parse it:


if (!string.IsNullOrEmpty(billingAddress.PhoneNumber))
{
     var cleanPhone = CommonHelper.EnsureNumericOnly(billingAddress.PhoneNumber);
     orderDetails.Payer.PhoneWithType = new PhoneWithType { PhoneNumber = new Phone { NationalNumber = cleanPhone } };
}


The "no order id passed" error I found was due to mixing up sandbox/prod credentials.
4 years ago
Hi. Thank you for your help. We already have the issue ticket about phone number, you may follow it by this link to see it

af1racing wrote:
I encountered the same phone error last week.  PayPal expects it to be strictly numeric without special characters like dash or plus (there's a Regex sample somewhere in their documentation that I fail to find at the moment), so I edited ServiceManager.cs in the plugin like this to parse it:


if (!string.IsNullOrEmpty(billingAddress.PhoneNumber))
{
     var cleanPhone = CommonHelper.EnsureNumericOnly(billingAddress.PhoneNumber);
     orderDetails.Payer.PhoneWithType = new PhoneWithType { PhoneNumber = new Phone { NationalNumber = cleanPhone } };
}


The "no order id passed" error I found was due to mixing up sandbox/prod credentials.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.