StoqShop Posted June 5, 2017 Share Posted June 5, 2017 Hello guys i have a problem with "Log in with PayPal" button. (I use PrestaShop 1.6.11.) and i have Official PayPal plugin. I set up the plugin according to the instructions.( I Correctly written my API username password and secret, merchand id and other information.)Then i I create an application on the ( developer.paypal.com ) and copy necessary information from my APP (live mode) like a client id and token. And paste this information to my PayPaL module. Hm everything should work. BUT some problem and it not working..When i press to "logIn" pay pal button , i see next message from paypal - "Relying Party Validation error: client_id or redirect_uri provided in the request does not match any of the registered clients. Please check the request." Guys, can you help me ? im trying to fix this problem... 3 days..Ps.s and sorry about my bad english. Link to comment Share on other sites More sharing options...
StoqShop Posted June 5, 2017 Author Share Posted June 5, 2017 (edited) May be it's mistake in Return URL? cause i write this one - http://www.mysite.net/modules/paypal/paypal_login/paypal_login_token.php Edited June 5, 2017 by StoqShop (see edit history) Link to comment Share on other sites More sharing options...
StoqShop Posted June 9, 2017 Author Share Posted June 9, 2017 Nobody know , how to fix this? Link to comment Share on other sites More sharing options...
Walles Posted June 14, 2017 Share Posted June 14, 2017 I think that maybe it's worth asking for support PayPal ? Link to comment Share on other sites More sharing options...
metacreo Posted May 31, 2018 Share Posted May 31, 2018 (edited) In 2018, PayPal changed API and "Login with PayPal" function stopped working. PayPal server JSON response pass the full name instead of firstname (given_name) and lastname (family_name). This option is completely incompatible with PrestaShop and we can see those PHP errors. PHP Notice: Undefined property: stdClass::$given_name PHP Notice: Undefined property: stdClass::$family_name PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Property Customer->lastname is empty' Temporary solution (fix for v3.11.6-paypal module) that I wrote a couple of minutes: 1. Open /modules/paypal/paypal_login/paypal_login.php 2. Find the function "private function setCustomer($result)" at file end (line 224). 3. After line 225 insert/add the PHP code part: $full_name_arr = strpos($result->name," "); $result->given_name = substr($result->name,0,$full_name_arr); $result->family_name = substr($result->name,$full_name_arr); 4. Save and replace file /modules/paypal/paypal_login/paypal_login.php This solution will separate the first word as "firstname" and any other words as "lastname" from PayPal response string "name" (fullname). Issue on Forge here: http://forge.prestashop.com/browse/PNM-3980 Edited May 31, 2018 by metacreo Issue on Forge (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now