Jump to content

New PayPal account - No order after payment (PrestaShop 1.6.0.11 with PayPal v3.8.1)


AWPcomputers

Recommended Posts

We recently updated our PrestaShop to 1.6.0.11 and at a similar time, due to a company name change needed to set up a new PayPal account.

 

The original Paypal account is still available, but technically we should not be using it.  Since the PrestaShop version update we have been successfully able to take a payment on the old PayPal account and successfully process the order in the back-office.

 

However, when we switch to the new PayPal account we cannot complete the order.  All we are doing is effectively changing the API username, API password & API signature in the PayPal module.  We can see the payment in the new PayPal account, but the order confirmation does not happen in PrestaShop.  As far as I can see, all the other settings remain the same.

 

We have also recently added another Payment module (PaymentSense) to the website, but don't believe this is giving us a problem, as that module takes payment & completes the order no problem.  It also works fine in conjunction with the first PayPal account.

 

We have done the obvious, such as remove the PayPal module and reinstall it.  This hasn't changed things.  The first Paypal account still works and the new one doesn't.  Without getting in to the technical details, I am convinced the PayPal system is passing something different back to our PrestaShop which the payment module is not being able to deal with.  We have spoken to PayPal on this point and they are saying this isn't the case.

 

As far as what is seen in PrestaShop is concerned, when the order is processed successfully on the old PayPal account, we see an order confirmation page which is generated by index.php

 
 
key=a48049aa7c8ac9b400b990c83cec1ca8
id_module=121
id_cart=9172
id_order=3143
fc=module
module=paypal
controller=submit
id_lang=2
 
When we use the new PayPal account, we see a blank html document on return from the PayPal pay page and can see a URL that is based on the PayPal module's directory within our PrestaShop
 
 
token=EC-7CK61590BM658843A
PayerID=XDKFQ32GJQXJ6
 
I have located this information in the error_log file that is being written in the 
 
[03-Feb-2015 17:25:12 GB] PHP Fatal error:  Uncaught exception 'PrestaShopException' with message 'Can't load Order status' in /our/website/folder/classes/PaymentModule.php:178
Stack trace:
#0 /our/website/folder/modules/paypal/paypal.php(1366): PaymentModuleCore->validateOrder(9172, 0, 0.35, 'PayPal', NULL, Array, 2, false, 'a48049aa7c8ac9b...', Object(Shop))
#1 /our/website/folder/modules/paypal/express_checkout/payment.php(290): PayPal->validateOrder(9172, NULL, 0.35, 'PayPal', NULL, Array, 2, false, 'a48049aa7c8ac9b...', Object(Shop))
#2 /our/website/folder/modules/paypal/express_checkout/payment.php(306): validateOrder(Object(Customer), Object(Cart), Object(PaypalExpressCheckout))
#3 {main}
  thrown in /our/website/folder/classes/PaymentModule.php on line 178
 
I have replaced the real directory names at the beginning of the file path with /our/website/folder/
 
I think this is the error that corresponds to payment token EC-7CK61590BM658843A & Payer ID XDKFQ32GJQXJ6, but I'm not 100% sure on that. 
 
After reading a number of other post in the forums, I was starting to think that there was something based on the ORDER STATUSES set up in PrestaShop and the new PayPal account maybe requiring one that we've not got set up, but I don't see how that information can be triggered by just the payment token and Payer ID that we are being returned. 
 
For reference the ORDER STATUSES are:
 
 
STATUSES [16]
 
1 Awaiting cheque payment (cheque)
2 Payment accepted (payment)
3 Preparation in progress (preparation)
4 Shipped (shipped)
5 Delivered (account)
6 Canceled (order_canceled)
7 Refund (refund)
8 Payment error (payment_error)
9 On backorder (outofstock)
10 Awaiting bank wire payment (bankwire)
11 Awaiting PayPal payment (account)
12 Payment remotely accepted (payment)
13 Authorization accepted from PayPal (account)
14 Shipping blocked (Shopgate) (BLANK)
16 Statut NetEven (BLANK)
17 On backorder (outofstock)
 
order-statuses-genie-juice-ltd.png
 
I hope the above makes sense?
 
I think I have included everything that is relevant to the set-up and the differences between the failed orders and successful orders (old PayPal account versus the new one).
 
Please let me know if any more information is needed.
 
Thanks in advance.
 
 

 

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