Jump to content
thirty bees forum
  • 0

PayPal new user failed to pay


grestart

Question

Hello,
when brand new user (email is not in customers list) try to pay with express payment, he faild. He get JS alert "payment Failure". After that,  client appears on the customer list, and second time he can pay with PayPal expres button. 

One more problem, if customers country is not enabled on TB BO Localization -> Countries, PayPal charge money, and when get back to shop ...module/paypal/incontextconfirm?confirm=1&PayerID=****&paymentID=****  get 500 error, with development mod i get error "throw new PrestaShopException('The delivery address country is not active.');"
so, money charged, but i cant see any order on orders list.

TB 1.1.0 
theme default Niara
PayPal v5.4.3 - by thirty bees
PHP 7.2.21
MySql 5.7.27-30
 

Edited by grestart
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1
4 hours ago, Tuan Pham said:

While I have not fully understood the PayPal module code yet, the following change to the modules/paypal/controllers/front/incontextvalidate.php file fixed the issue for me:

Line 75, change from  


$ppc->id_customer = $this->context->customer->id;

to


$ppc->id_customer = $customer->id;

My guess is that while the module creates the customer record, the customer has not logged in and thus it is not available in the context.

I'd appreciate if thirtybees developers can confirm if my change is good or not.

https://github.com/thirtybees/paypal/commit/781f3ad363df3d1c4968c32d4a73cf9b9bca25d7

Link to comment
Share on other sites

  • 0
10 minutes ago, AndyC said:

Have you tried the prestashop version .. I too was having issues with the TB and found the other and it works very well,even directs you to the right page to get your details

No, i dont, but i thinking about it. If it work well, i will try.

Link to comment
Share on other sites

  • 0

While I have not fully understood the PayPal module code yet, the following change to the modules/paypal/controllers/front/incontextvalidate.php file fixed the issue for me:

Line 75, change from  

$ppc->id_customer = $this->context->customer->id;

to

$ppc->id_customer = $customer->id;

My guess is that while the module creates the customer record, the customer has not logged in and thus it is not available in the context.

I'd appreciate if thirtybees developers can confirm if my change is good or not.

  • Like 2
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...