Welcome Guest, Not a member yet? Register   Sign In
Problem handling Paypal IPN + PDT
#1

[eluser]ecigraeme[/eluser]
Hi,

I am currently developing a site that uses paypal standard payments. When a payment is made paypal sends the information back to the site using an IPN notification and returns the user to the site along with the info as a PDT. I use both because I am giving digital downloads.

Both PDT and IPN verify that the information they have been sent really came from paypal by sending it back to paypal. If paypal recognises that it is a real transaction it returns verified.

Things all work fine in the sandbox but now that I have switched paypal to live it has stopped working.

When paypal forwards me back to the success page on my site. I see the following error, the IPN also fails with an INVALID response.

Quote:PHP Warning: require(../system/libraries/Exceptions.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in C:\Domains\mydomain.com\system\codeigniter\Common.php on line 116
PHP Warning: require(../system/libraries/Exceptions.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in C:\Domains\ mydomain.com\system\codeigniter\Common.php on line 116
PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '../system/libraries/Exceptions.php' (include_path='.;C:\PHP5\pear') in C:\Domains\mydomain.com\system\codeigniter\Common.php on line 116

The strange thing is that when I refresh the page I don't get the error and the PDT information is verified and displayed as expected. I see the same error even with a die() statement on the first line of code in my success controller function, when refreshed the die() output is shown instead of the error.

I am using
$config['uri_protocol'] = "PATH_INFO";
$config['enable_query_strings'] = TRUE;

as suggested here to allow query strings and segments

I am using IIS and Pear appears to be installed.

I have the application folder at the same level as the system folder.

Does anybody have any ideas why this is happening.

Any help or insights would be much appreciated.

Thanks
#2

[eluser]ecigraeme[/eluser]
Any ideas anyone, thanks.
#3

[eluser]captainredmuff[/eluser]
I'd be interested to see a response to this one as i am having a similar problem with PayPal IPN. Everything works fine in the sandbox but as soon as it goes live, i get an INVALID response even though money has changed hands. Obviously this isn't a viable option for a live site but i'm at my whits end and don't want to start writing hacks to work around this issue.
#4

[eluser]ecigraeme[/eluser]
I changed Common.php around line 116 to this, to try and find out what is happening.

Code:
if( is_file(BASEPATH.'libraries/'.$class.EXT) )
{
    require(BASEPATH.'libraries/'.$class.EXT);
    $is_subclass = FALSE;
}
else
{

    debug_print_backtrace();
    die();
}

debug_print_backtrace gives an output similar to this. The class that fails to load is Exceptions.php.

Code:
#0  load_class(Exceptions) called at [C:\Domains\mydomain.com\system\codeigniter\Common.php:217]

#1  show_error(Unable to load the requested file: paypal/success.php) called at [C:\Domains\mydomain.com\system\libraries\Loader.php:620]

#2  CI_Loader->_ci_load(Array ([_ci_view] => paypal/success,[_ci_vars] => Array ([bannerlinks] => Array ([0] => <a href="http://www.mydomain.com/index.php/shop/download_banner/42W858691J6909105/154">Click here to download product 1</a>),[pageTitle] => Checkout),[_ci_return] => )) called at [C:\Domains\mydomain.com\system\libraries\Loader.php:307]

#3  CI_Loader->view(paypal/success, Array ([productlinks] => Array ([0] => <a href="http://www.mydomain.com/index.php/shop/download_ product/42W858691J6909105/154">Click here to download product 1</a>),[pageTitle] => Checkout)) called at [C:\Domains\mydomain.com\application\controllers\paypal.php:253]

#4  Paypal->checkout() called at [(null):0]

#5  call_user_func_array(Array ([0] => Paypal Object ([_ci_scaffolding] => ,[_ci_scaff_table] => ,[config] => CI_Config Object ([config] => Array ([site_live] => ,[this_web_site] => mydomain,[use_index] => index.php/,[debug_email] => [email protected],[path_to_banners] => C:\Domains\mydomain.com\products\,[base_url] => http://www.mydomain.com/,[index_page] => ,[uri_protocol] => PATH_INFO,[url_suffix] => ,[language] => english,[charset] => UTF-8,[enable_hooks] => ,[subclass_prefix] => MY_,[permitted_uri_chars] => a-z 0-9~%.:_\-,[enable_query_strings] => 1,[controller_trigger] => c,[function_trigger] => m,[directory_trigger] => d,[log_threshold] => 0,[log_path] => ,[log_date_format] => Y-m-d H:i:s,[cache_path] => ,[encryption_key] => ,[sess_cookie_name] => ci_session,[sess_expiration] => 7200,[sess_encrypt_cookie] => ,[sess_use_database] => 1,[sess_table_name] => ci_sessions,[sess_match_ip] =>
.........

#6  require_once(C:\Domains\mydomain.com\system\codeigniter\CodeIgniter.php) called at [C:\Domains\mydomain.com\wwwroot\index.php:115]

Bearing in mind that the page loads properly when I refresh it. Is there something about the re-direct from paypal that is causing problems when compared to when I refresh the page in my browser and why does it work in the sandbox.

Im puzzled. Anyone have any ideas?

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB