kidino / simple-ipn

Digital download purchase delivery using Paypal IPN (PHP)
6 stars 9 forks source link

thankyou.php - 404 Not Found #2

Open JeffGER opened 6 years ago

JeffGER commented 6 years ago

First i would like say THANKS for this amazing script! I have include a little licencesystem too for my program but this basisscript is very smart :-)

But... there is a BUG by the thankyou.php, its not possible to parse the array ["tx"] value? Everytime i got a 404 errormessage.

This is my solution:


include('settings.php');
include('functions.php');

    $xt_ext = print_r($_REQUEST['tx'], true);
    $amt_ext = print_r($_REQUEST['amt'], true);

if (isset($xt_ext)) {
    $script_uri = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];

    $this_file = 'thankyou.php';
    $download_page_url = str_replace($this_file, 'page.php?dl-'.$xt_ext, $script_uri);

    $filename = 'tpl_tqpage.html';
    $fhandle = fopen($filename, "r");
    $page_html = fread($fhandle, filesize($filename));
    fclose($fhandle);

    $page_html = str_replace('{PAYPAL TXN ID}', $xt_ext, $page_html);
    $page_html = str_replace('{DOWNLOAD PAGE URL}', $download_page_url, $page_html);
    $page_html = str_replace('{PRODUCT NAME}', $product_name, $page_html);
    $page_html = str_replace('{PRODUCT PRICE}', $amt_ext, $page_html);
    $page_html = str_replace('{SUPPORT EMAIL ADDRESS}', $support_email_address, $page_html);

    echo $page_html;
} else { ?>

<h1>404 Not Found</h1>

<?php }
if ($debug == 1) {

    echo "<pre>";
    var_dump($_REQUEST);
    echo "</pre>";

    if (file_exists($_GET['tx'].'.php')) {
        echo "<pre>";
        echo file_get_contents($_GET['tx'].'.php');
        echo "</pre>";
    } 

}
jackttcoms commented 6 years ago

Would it be possible for you to post your customised script onto Github as you have changed bits of it which may cause the errors like the license system may interfere etc

kidino commented 6 years ago

I think tx is something that you get from Paypal. Maybe Paypal is not sending it anymore. I will look into this during the weekend.

BudComSol commented 5 years ago

Any further work on this?

kidino commented 5 years ago

No. Development has stopped actually. But I didn't announce that.

BudComSol commented 5 years ago

Thank you for the reply.