tdr170 Posted April 15, 2014 Share Posted April 15, 2014 (edited) This is a new one and I can not seem to find the answer, I have a 1.6.0.6 test site that is upgraded from 1.5.6.1 and all works well with the exception of Paypal. After placing an order When Paypal returns you to the site you get a 404 page error and it seems as though Paypal is trying to return to the old confirmation.php file that used to be in the root folder. If you copy the confirmation.php file to the root then it will return to the order confirmation page but is slightly wrong as I have the left column displayed on all pages and when it returns the left column does not display and their are 2 Oder confirmation nav pipes. As you can see the 404 keeps the left column as it should and with the order-confirmation.php copied to the root left column not shown. Everything else about the order is OK mails are sent, order shows in BO, upon changing order status mails are sent. Has anyone seen this issue. Standard return. W/ order-confirmation.php copied to root. If you click back to orders you see this which is correct. Edited April 15, 2014 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
tdr170 Posted April 16, 2014 Author Share Posted April 16, 2014 No One!!! Link to comment Share on other sites More sharing options...
kaic Posted April 18, 2014 Share Posted April 18, 2014 For me the same problem. Please decision and help. Link to comment Share on other sites More sharing options...
tdr170 Posted April 18, 2014 Author Share Posted April 18, 2014 (edited) Here is a solution that I found myself this will at least return you to the site without a 404 page not found issue. This is for PayPal USA, Canada V1.3.3 In this case I changed the code to return to the order-history page instead the order-confirmation because in my case this shows the left column. You can also test this - controller=order-confirmation instead of controller=order-history Lines - 378-381 change this: ((int)version_compare(_PS_VERSION_, '1.6' )) ? (Configuration::get('PS_SSL_ENABLED') ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true)). __PS_BASE_URI__.'index.php?order-confirmation.php?id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->id.'&key='.$this->context->customer->secure_key : $this->context->link->getPageLink('index.php?order-confirmation.php', null, null, array('id_cart' => (int)$this->context->cart->id, 'key' => $this->context->customer->secure_key, 'id_module' => $this->id)), to this ((int)version_compare(_PS_VERSION_, '1.6' )) ? (Configuration::get('PS_SSL_ENABLED') ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true)). __PS_BASE_URI__.'index.php?controller=order-history?id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->id.'&key='.$this->context->customer->secure_key : $this->context->link->getPageLink('index.php?controller=order-history', null, null, array('id_cart' => (int)$this->context->cart->id, 'key' => $this->context->customer->secure_key, 'id_module' => $this->id)), See my next post Edited April 19, 2014 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
tdr170 Posted April 19, 2014 Author Share Posted April 19, 2014 This is for PayPal USA, Canada V1.3.3 OK so I think I found a way to fix this even better solution, first go to SEO & URL's and you will see that there is no friendly url for Order confirmation. Click the plus sign to add new page and use the drop down and select order-confirmation then add Page title: Order confirmation Rewritten URL: order-confirmation Now edit the paypal.php file and change lines as below - modules, paypalusa at lines 378-381 change this: ((int)version_compare(_PS_VERSION_, '1.4', '>')) ? (Configuration::get('PS_SSL_ENABLED') ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true)). __PS_BASE_URI__.'order-confirmation.php?id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->id.'&key='.$this->context->customer->secure_key : $this->context->link->getPageLink('order-confirmation.php', null, null, array('id_cart' => (int)$this->context->cart->id, 'key' => $this->context->customer->secure_key, 'id_module' => $this->id)), )); To this: ((int)version_compare(_PS_VERSION_, '1.4', '>')) ? (Configuration::get('PS_SSL_ENABLED') ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true)). __PS_BASE_URI__.'order-confirmation?id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->id.'&key='.$this->context->customer->secure_key : $this->context->link->getPageLink('order-confirmation', null, null, array('id_cart' => (int)$this->context->cart->id, 'key' => $this->context->customer->secure_key, 'id_module' => $this->id)), )); Now we need to edit one file so that there are not 2 nav pipes (breadcrumbs) on the page, go to themes, default-bootstrap and edit order-confirmation.tpl and remove {include file="$tpl_dir./breadcrumb.tpl"} from line 27. Now on order return you should see a normal page return mine now looks like this. 2 Link to comment Share on other sites More sharing options...
Nihelan Posted April 22, 2014 Share Posted April 22, 2014 The above also worked for the HiPay payment module, which was still configured to order-confirmation.php. Not as compatible with 1.6 as they promise I guess. 1 Link to comment Share on other sites More sharing options...
nickmummy Posted May 5, 2014 Share Posted May 5, 2014 Hi I have this same problem.. can anyone advise where to change the content without going in depth to PHP? I know nuts about PHP.. an tech idiot here.. hope to see some light Link to comment Share on other sites More sharing options...
tdr170 Posted May 5, 2014 Author Share Posted May 5, 2014 The only way I have found with this version is to edit the PHP, you can also use PayPal module 3.6.8 which does not require any editing. If you do not have this module in your list I can include a zip file of it here. 1 Link to comment Share on other sites More sharing options...
soapcommander Posted May 5, 2014 Share Posted May 5, 2014 Yes please tdr170 , would you please include the zip for this version? Thanks. Link to comment Share on other sites More sharing options...
nickmummy Posted May 5, 2014 Share Posted May 5, 2014 Hi.. I am using PayPal USA, Canada V1.3.3.. If I use PayPal module 3.6.8, would it works? I am in Singapore btw.. Link to comment Share on other sites More sharing options...
tdr170 Posted May 5, 2014 Author Share Posted May 5, 2014 Here is a zip of V3.6.8 give it a try. PayPal v3.6.8.zip 1 Link to comment Share on other sites More sharing options...
soapcommander Posted May 5, 2014 Share Posted May 5, 2014 Here is a zip of V3.6.8 give it a try. PayPal v3.6.8.zip Is it a version that good for US PayPal? Thanks for posting. Link to comment Share on other sites More sharing options...
tdr170 Posted May 6, 2014 Author Share Posted May 6, 2014 Yes I am in US and this is currently what is installed in my Prestashop and has been fully tested with PayPal sandbox. Link to comment Share on other sites More sharing options...
walvin Posted May 6, 2014 Share Posted May 6, 2014 Here is a zip of V3.6.8 give it a try. PayPal v3.6.8.zip Where exactly does this go? in /modules/ or my root? Oddly enough I don't have this folder, just one called modules/paypalusa/. The files do not match anything I have either. I installed fresh and didn't upgrade so that may have something to do with it. Link to comment Share on other sites More sharing options...
tdr170 Posted May 6, 2014 Author Share Posted May 6, 2014 You can install this as you would any other module, go to the modules page and use add new module browse to location on your computer where you saved and click upload. Before installing be sure and uninstall the PaypalUSA version. If you upload the unzipped folder it should be placed in the modules folder. 1 Link to comment Share on other sites More sharing options...
walvin Posted May 6, 2014 Share Posted May 6, 2014 Ah, sorry I was confused. I didn't realize this is the paypal europe module, I thought you were editing the paypalusa module. I decided to give it a try so I deleted paypalusa and ftp'ed this one in. I can check out and pay but I get a blank page when it returns to the site after paying. 1 Link to comment Share on other sites More sharing options...
Lee Posted May 8, 2014 Share Posted May 8, 2014 (edited) I'm having the same problem with paypal taking payment either by card or Paypal account but no order being created. We have 1.6.0.6 with the standard Paypal module downloaded from addons.prestashop.com (v3.6.8), and Paypal Pro with 3 click checkout enabled, and SSL. We're using redirect. Is the iframe option secure? It works for us but doesn't redirect when customer's pay by card and I'm concerned about it's security. In (v3.6.8) paypal.php there is no order-confirmation.php to change, it's just 'paypal_confirmation'. Is this error not related to incorrect permissions in the module folder? There is a temporary work-around for this problem of not receiving orders: 1.6 allows you to create the order from the shopping cart: Have the Paypal order email confirmation to hand so you can compare all the details: customer name, address, price etc. In back-end, go to 'customers'>'shopping cart' and find the customer's order/cart (usually minus shipping cost), click on it. Click the 'create an order from this cart' button in the 'order information' box. If the cart info is not already showng, type the customer's name into the search box, click 'choose' on the relevant one. The cart(s) will be underneath the customer's name/info, click the 'use' button on the relevant one. The cart info will appear below which is usually the same as the order placed. Check address, total price etc, everything is same as the Paypal order, and choose the correct order status (usually payment accepted), then click the 'create the order' button. This will create the order in the 'orders' section as it normally would have appeared. Edited May 18, 2014 by Lee (see edit history) Link to comment Share on other sites More sharing options...
nickmummy Posted May 8, 2014 Share Posted May 8, 2014 hey thnks to all.. the V3.6.8 works for me! 1 Link to comment Share on other sites More sharing options...
soapcommander Posted May 10, 2014 Share Posted May 10, 2014 V3.6.8 worked for me also....SOLVED Link to comment Share on other sites More sharing options...
soapcommander Posted May 10, 2014 Share Posted May 10, 2014 Thanks to all who helped...I would highly recommend that Prestashop make this a priority in their next upgrade. PayPal US is broken and needs professional help. While this work around solved it for me, it will continue to be an issue IMHO. Thanks. Link to comment Share on other sites More sharing options...
bellini13 Posted May 10, 2014 Share Posted May 10, 2014 You should submit your changes to the github. Don't expect Prestashop to read this thread and apply your changes. 1 Link to comment Share on other sites More sharing options...
tdr170 Posted May 10, 2014 Author Share Posted May 10, 2014 (edited) I posted A forge report and also included the way I fixed so Prestashop does know about this issue. Also since this module is not part of the Github files how would you report this there? Edited May 10, 2014 by tdr170 (see edit history) 1 Link to comment Share on other sites More sharing options...
soapcommander Posted May 10, 2014 Share Posted May 10, 2014 Thanks so much tdr170...appreciate it Link to comment Share on other sites More sharing options...
bellini13 Posted May 10, 2014 Share Posted May 10, 2014 paypal europe is in github https://github.com/PrestaShop/PrestaShop-modules/tree/master/paypal Link to comment Share on other sites More sharing options...
tdr170 Posted May 10, 2014 Author Share Posted May 10, 2014 paypal europe is in github https://github.com/PrestaShop/PrestaShop-modules/tree/master/paypal That is Paypal Europe Not PayPalUSA and also appears to be the 1.5 branch??? of Github which is really what this post is about, That is also version 3.6.8 and with that version the issue of return to order-confirmation does not exist. I looked here https://github.com/PrestaShop/PrestaShop/tree/1.6/modules and do not see any PayPal modules at all. Thanks Link to comment Share on other sites More sharing options...
bellini13 Posted May 12, 2014 Share Posted May 12, 2014 I think you are confused on how they use github. There is a single git for prestashop modules. The link I gave you is for paypal europe, for which a patch was provided in previous post. if you want to apply changes to paypalusa, that is there as well https://github.com/PrestaShop/PrestaShop-modules/tree/master/paypalusa Link to comment Share on other sites More sharing options...
jwilbala Posted May 20, 2014 Share Posted May 20, 2014 Please help me! I have installed PS 1.6 and I don't have the file order-confirmation.php. So I created this file, put it in the prestashop root folder, and enter the following content: <?phprequire(dirname(__FILE__).'/config/config.inc.php');Tools::redirect('index.php?controller=order-confirmation'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); Is this correct? I'm using paypalusa but the return does not work. After finalizing a payment in paypal, the order is not generated. Thank you for your attention! Link to comment Share on other sites More sharing options...
tdr170 Posted May 20, 2014 Author Share Posted May 20, 2014 Please help me! I have installed PS 1.6 and I don't have the file order-confirmation.php. So I created this file, put it in the prestashop root folder, and enter the following content: <?php require(dirname(__FILE__).'/config/config.inc.php'); Tools::redirect('index.php?controller=order-confirmation'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); Is this correct? I'm using paypalusa but the return does not work. After finalizing a payment in paypal, the order is not generated. Thank you for your attention! Please read this post from the start there is a solution to this issue on page 1, Post #5 and an alternative module at post #11. 1.6 does not use the order-confirmation.php as in previous versions. Link to comment Share on other sites More sharing options...
effectualmedia Posted May 27, 2014 Share Posted May 27, 2014 Hello, I am using Prestashop 1.6.0.6 and PayPal USA, Canada v1.3.3. Everything works fine except Order Confirmation page showing 404 error returning from PayPal after payment. We have SEO Friendly URL disable and taxes are disable too.After payment done, when user auto redirect to a 404 page not available for the order confirmation.Here is what the link shows: [mysite]/order-confirmation.php?id_cart=20&id_module=73&key=[key]I can see orders in admin and emails alerts working too. I also changed order-confirmation.php to order-confirmation on paypalusa.php Regards,Hiren. Link to comment Share on other sites More sharing options...
bellini13 Posted May 27, 2014 Share Posted May 27, 2014 did you even read the thread or the post directly above yours? Link to comment Share on other sites More sharing options...
effectualmedia Posted May 27, 2014 Share Posted May 27, 2014 Bro, I read thread 2 times and I applied solutions provided in thread, but not working. Link to comment Share on other sites More sharing options...
bellini13 Posted May 27, 2014 Share Posted May 27, 2014 If you made the change from order-confirmation.php to order-confirmation, then you would not be receiving a link with order-confirmation.php in it, wnow would you? PaypalUsa Version 1.3.3 has order-confirmation.php in 5 different files, make sure you are changing the correct files based on your PS version 1) expresscheckout.php (used in PS 1.4) 2) paypalusa.php (used in all PS versions) 3) validation.php (used in PS 1.4) 4) controllers/front/expresscheckout.php (used in PS 1.5+) 5) controllers/front/validation.php (used in PS 1.5+) 1 Link to comment Share on other sites More sharing options...
AMBER Posted June 19, 2014 Share Posted June 19, 2014 (edited) Hi tdr170 I downloaded your module and I got this message below. Why is it so? please save me. Error occurred: Please try to contact the merchant: <b>PayPal response:</b> TIMESTAMP -> 2014-06-19T18:19:11Z L_ERRORCODE0 -> 10002 L_SHORTMESSAGE0 -> Security error L_LONGMESSAGE0 -> Security header is not valid L_SEVERITYCODE0 -> Error Edited June 19, 2014 by AMBER (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted June 20, 2014 Share Posted June 20, 2014 your paypal API credentials are wrong Link to comment Share on other sites More sharing options...
tdr170 Posted June 27, 2014 Author Share Posted June 27, 2014 Credentials are wrong or you are in sandbox mode, double check the credentials and mode. Link to comment Share on other sites More sharing options...
fr34ck Posted July 7, 2014 Share Posted July 7, 2014 The above also worked for the HiPay payment module, which was still configured to order-confirmation.php. Not as compatible with 1.6 as they promise I guess. I can confirm that this work also for HiPay module. From $paymentParams->setIssuerAccountLogin($this->context->customer->email); $paymentParams->setUrlCancel(Tools::getShopDomainSsl(true).__PS_BASE_URI__.'order.php?step=3'); $paymentParams->setUrlNok(Tools::getShopDomainSsl(true).__PS_BASE_URI__.'order-confirmation.php?id_cart='.(int)$cart->id.'&id_module='.(int)$this->id.'&secure_key='.$customer->secure_key); $paymentParams->setUrlOk(Tools::getShopDomainSsl(true).__PS_BASE_URI__.'order-confirmation.php?id_cart='.(int)$cart->id.'&id_module='.(int)$this->id.'&secure_key='.$customer->secure_key); To $paymentParams->setIssuerAccountLogin($this->context->customer->email); $paymentParams->setUrlCancel(Tools::getShopDomainSsl(true).__PS_BASE_URI__.'order?step=3'); $paymentParams->setUrlNok(Tools::getShopDomainSsl(true).__PS_BASE_URI__.'order-confirmation?id_cart='.(int)$cart->id.'&id_module='.(int)$this->id.'&secure_key='.$customer->secure_key); $paymentParams->setUrlOk(Tools::getShopDomainSsl(true).__PS_BASE_URI__.'order-confirmation?id_cart='.(int)$cart->id.'&id_module='.(int)$this->id.'&secure_key='.$customer->secure_key); Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts