Jump to content

PayPal Server Error


maxoneill

Recommended Posts

Hi, I have recently installed Prestashop  V1.6.0.11 I also installed the Prestashop addon for PayPal "Payments & Gateways" version 3.8.1 (Europe Version)

 

I have tested a transaction on my site & receive the following message after completing the transaction with PayPal

 

"Server error 

 

The website encountered an error while retrieving http://xxxxxxx/modules/paypal/express_checkout/payment.php?token=EC-0N033366G50363729&PayerID=WUVQFSY7SEQZL. It may be down for maintenance or configured incorrectly."

 

(I haven't put in my literal web address)

 

The transaction goes through with Paypal but there is no record of the transaction in the store admin as the transaction is not completed in the store. I'm situated in NZ & I have checked my PayPal details a number of times etc.

 

Please advise what I need to do.

Edited by maxoneill (see edit history)
Link to comment
Share on other sites

close.jpg
text-x-generic.png error_log 
ASCII text
[19-Feb-2015 13:24:14 Pacific/Auckland] PHP Fatal error:  Uncaught exception 'PrestaShopException' with message 'Property Order->payment is empty' in .../prestashop/classes/ObjectModel.php:866Stack trace:#0 .../prestashop/classes/ObjectModel.php(272): ObjectModelCore->validateFields()#1 .../prestashop/classes/order/Order.php(299): ObjectModelCore->getFields()#2 .../prestashop/classes/ObjectModel.php(480): OrderCore->getFields()#3 .../prestashop/classes/order/Order.php(304): ObjectModelCore->add(true, true)#4 .../prestashop/classes/PaymentModule.php(335): OrderCore->add()#5 .../prestashop/modules/paypal/paypal.php(1366): PaymentModuleCore->validateOrder(9, 2, 0.75, '', 'Payment accepte...', Array, 2, false, '97f041fcc6738ab...', Object(Shop))#6 .../prestashop/modules/paypal/express_ch in .../prestashop/classes/ObjectModel.php on line 866[19-Feb-2015 13:24:45 Pacific/Auckland] PHP Fatal error:  Uncaught exception 'PrestaShopException' with message 'Property Order->payment is empty' in .../prestashop/classes/ObjectModel.php:866Stack trace:#0 .../prestashop/classes/ObjectModel.php(272): ObjectModelCore->validateFields()#1 .../prestashop/classes/order/Order.php(299): ObjectModelCore->getFields()#2 .../prestashop/classes/ObjectModel.php(480): OrderCore->getFields()#3 .../prestashop/classes/order/Order.php(304): ObjectModelCore->add(true, true)#4 .../prestashop/classes/PaymentModule.php(335): OrderCore->add()#5 .../prestashop/modules/paypal/paypal.php(1366): PaymentModuleCore->validateOrder(9, 2, 0.75, '', 'Payment accepte...', Array, 2, false, '97f041fcc6738ab...', Object(Shop))#6 .../prestashop/modules/paypal/express_ch in .../prestashop/classes/ObjectModel.php on line 866
Link to comment
Share on other sites

Hi, thank you for starters for helping out here, I am fairly green (newbie), I have run as you asked & have the following error message after returning from PayPal to the store.

 

Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in /..../prestashop/modules/paypal/paypal_orders.php on line 70

Fatal error: Uncaught exception 'PrestaShopException' with message 'Property Order->payment is empty' in /..../prestashop/classes/ObjectModel.php:866 Stack trace: #0 /..../prestashop/classes/ObjectModel.php(272): ObjectModelCore->validateFields() #1 /..../prestashop/classes/order/Order.php(299): ObjectModelCore->getFields() #2 /..../prestashop/classes/ObjectModel.php(480): OrderCore->getFields() #3 /..../prestashop/classes/order/Order.php(304): ObjectModelCore->add(true, true) #4 /..../prestashop/classes/PaymentModule.php(335): OrderCore->add() #5 /..../prestashop/modules/paypal/paypal.php(1366): PaymentModuleCore->validateOrder(9, 2, 0.75, '', 'Payment accepte...', Array, 2, false, '97f041fcc6738ab...', Object(Shop)) #6 /..../prestashop/modules/paypal/express_ch in /..../prestashop/classes/ObjectModel.php on line 866

Link to comment
Share on other sites

You have 2 errors going on here

'Property Order->payment is empty' in .../prestashop/classes/ObjectModel.php:866

The first error is a defect with PS v1.6.0.11.  Prior versions would default to the default language if the translation is empty.  In this version, it literally uses the blank value.

 

The error you have is that the translation field "Paypal" is empty, but it is required to create the order.  So to fix that error, you simply need to translate Paypal to "Paypal".

 

The real fix however is to update the Translate and AdminTranslateController classes.

https://github.com/PrestaShop/PrestaShop/commit/9e27137fc1f1d57d4da9fc3fc1a63bba23c9a422
 

Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in /..../prestashop/modules/paypal/paypal_orders.php on line 70

The second error I have seen before.  Since you have free shipping enabled, then shipping does not apply.  So Paypal is not returning the variable "PAYMENTREQUEST_0_SHIPPINGAMT" to the module.  However the module is too stupid to deal with that and bombs.

 

So you would have to update the module so that shipping can be optional, and when that variable is missing, it does not bomb.

Edited by bellini13 (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi, thank you so much, I changed within the Localization>Translation all the empty "PayPal" fields to PayPal & it worked but I believe there is still a lot of info missing i.e. messages for the customer etc missing once the order is complete.  I have tried the update at  https://github.com/PrestaShop/PrestaShop/commit/9e27137fc1f1d57d4da9fc3fc1a63bba23c9a422 but I got an error message & the whole store went down so I uploaded the original files & it came right. Can I have a little clarity on this? Do I find & edit the particular lines only in each file as I tried copying the whole file.

 

Thanks again

Link to comment
Share on other sites

similar problem with paypal.

the debug error code image attached.

can you help?

 

Paypal US Canada 1.3.8

PS 1.6.0.6

 

from checkout page -> moved to paypal login -> 

after clicking payment button -> no payment is processed at both shopping admin and paypal.

just this error.

 

thanks in adv.

post-534816-0-88161700-1424372153_thumb.jpg

Link to comment
Share on other sites

Hi, thank you so much, I changed within the Localization>Translation all the empty "PayPal" fields to PayPal & it worked but I believe there is still a lot of info missing i.e. messages for the customer

 

No, you should not translate every field to Paypal.  Just the one field labelled "Paypal", you need to provide the translation as "Paypal".  Then translate all the other fields accordingly, don't use Paypal for all of them.

 

 I have tried the update at  https://github.com/P...1a63bba23c9a422 but I got an error message & the whole store went down so I uploaded the original files & it came right. Can I have a little clarity on this? Do I find & edit the particular lines only in each file as I tried copying the whole file.

 

You need to download the entire files and replace your existing files with the new ones.  I really do not know how else to clarify that for you

  • Like 1
Link to comment
Share on other sites

Hi xmilo, I think there may be different symptoms for the USA version & the European version. It appears the main issue for me was a translation issue. PS 1.6.0.11 had "translate no" as a default setting for modules, so when I installed them instead of translating them into the default language on my site "English" it would leave all the fields blank.

 

Hence the reason for miss communication between my store and PayPal. Required fields were missing in the communication.

 

I have seen in my search some specific USA module version issues. I'm not sure if it is the same issue though.

Link to comment
Share on other sites

1/ Go to https://github.com/PrestaShop/PrestaShop/commit/9e27137fc1f1d57d4da9fc3fc1a63bba23c9a422 download the specified files & upload them to the specified directories.

(Keep the original files for backup)

2/ Reinstall the PayPal European version re-configure. (As the translations where empty, I manually went through Localization>Translation> selected "installed modules translations" from the drop down, "default-bootstrap", Language "English", then selected "Modify" (If you get an error about tables, that is a separate issue relating to your hosting & server settings). I then hit Ctrl F to search for PayPal & filled the fields manually, copied/paste & make some changes to personalize it. 

3/ Re the free shipping, I had changed the shipping code for PayPal in ..../prestashop/modules/paypal/express_checkout/process.php

 

private function _setPaymentDetails(&$fields)
    {
        // Required field
        $fields['RETURNURL'] = PayPal::getShopDomainSsl(true, true)._MODULE_DIR_.$this->name.'/express_checkout/payment.php';

        $fields['NOSHIPPING'] = '2';
        $fields['BUTTONSOURCE'] = $this->getTrackingCode((int)Configuration::get('PAYPAL_PAYMENT_METHOD'));

 

As the default was '1' & that stands for shipping not required, the below is form PayPal re this but refers to HTML & buttons but covers what the codes mean. *****Note, I only have one shipping option & there is no physical store*****

 
  • Make shipping optional <input type="checkbox" title="Manual" name="no_shipping" value="0">
  • No shipping needed <input type="checkbox" title="Manual" name="no_shipping" value="1">
  • Yes, require shipping <input type="checkbox" title="Manual" name="no_shipping" value="2">

 

Hope this helps but I'm away laughing now  :lol:

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