Jump to content

[SOLVED] Payment accepted but download unsuccesful


keyura

Recommended Posts

I get the payment through paypal, i get the emails also + even my customer receives the email and invoice. Everything works fine till here. But when the customer clicks on the link to download, acrobat reader notifies that it is either not supported format or becuase the file is damaged.
I tried going to pHpmyAdmin and checked the hash codes do match.
Moreover i even wrote the code ob_end_flush(); in get-file.php
i am not the master but i tried searching the forum and whatever help i could find, i have implemented.

All efforts in vain, any help will be highly appreciated.
I am using the prestashop version 1.3.2.3.

Link to comment
Share on other sites

In config/config.inc.php, I have changed it as follows:


From
/* Debug only */
ini_set('display_errors', 'off');
define('_PS_DEBUG_SQL_', false);

to

/* Debug only */
ini_set('display_errors', 'on');
define('_PS_DEBUG_SQL_', false);


Thereafter I have tried as you said and i opened the invoice with notepad and it is as attached here. Please have a look at it as I am not that techy savyy.

Hope you will be able to recognize something.

pdf-invoice.txt

Link to comment
Share on other sites

Ok after a while I did this...

I opened the invoice and the link i was clicking to download. I did right click on it and save it as... then saved it as txt file.

THe following contents are there in that notepad file.


Warning: readfile() has been disabled for security reasons in /home/freemone/public_html/onedollarshop/get-file.php on line 264



Kindly help further please. What do i have to do now?

I found the following code at that position in get-file.php

/* Set headers for download */
header('Content-Transfer-Encoding: binary');
if ($mime_type)
header('Content-Type: '.$mime_type);
header('Content-Length: '.filesize($file));
header('Content-Disposition: attachment; filename="'.$filename.'"');
readfile($file);

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