CodeIgniter Forums
Paypal returned response giving problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Paypal returned response giving problem (/showthread.php?tid=52978)



Paypal returned response giving problem - El Forum - 07-05-2012

[eluser]vikas.fourorange[/eluser]
Hi,

I am working on an application in which I have integrated Paypal. while returning from the paypal , I mean at success page I am getting

Code:
An Error Was Encountered
The action you have requested is not allowed.

1. My Success url is directly accessible from the url and printing "test" which is the only thing I echoed in Success function.

2. This errors only occurs while returning from paypal.

I guess this is some problem with CI_TOKEN. I tried to send the ci_token to paypal but still giving the same error.

Please help how to remove this.

Thanks


Paypal returned response giving problem - El Forum - 07-12-2012

[eluser]rip_pit[/eluser]
it could be related to csrf protection. you should set 'csrf_exclude_uris' to exclude your page.
when the url given to paypal to post back his datas to your site is like :
mysite.com/bank/call_autoresponse
then you must set
application/config/config.php
Code:
$config['csrf_protection'] = true;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array('bank/call_autoresponse');


Only in version 2.1+ if i remember. or simply disable csrf protection