Welcome Guest, Not a member yet? Register   Sign In
Accepting callback GET parameters
#1

[eluser]Uto[/eluser]
Hi, I'm making an integration of a B2C system with the bank B2C platform and I can provide the bank a callback URL. The bank then makes a callback to that URL, adding a parameter on the URL (sadly, method GET ).

The problem is the callback does not enter the index method, in fact, it doesn't even enter a _remap method and it's apparently due to

$config['permitted_uri_chars']

The problem is that added parameter is a complete XML block with many fields that may contain many different characters, so there's no way I can save that but setting
$config['permitted_uri_chars'] = '', what obviously I don't want to do cause it will affect the rest of controllers.

So the question is ... is there a way to allow any char but only for one controller? My only option is setting up another complete CI with different setting only for that controller?

Thanks.
#2

[eluser]iNfLuX[/eluser]
Do you have control on the way the bank make the callback to the provided URL ?
Can you post the example of the URL ?
#3

[eluser]Uto[/eluser]
No, I have no control at all, I just can pass the base url and then they add somethign like this:

?peticion=&lt;xml&gt;&lt;transid>27832</transid><shop>My Customer Name</shop><value>678.32</value><currency>euro</currency><notes>any text</notes>

I think is a dumb way of sending an XML to be honest, but I have no way to change it.
#4

[eluser]Uto[/eluser]
I get this on the log if I set it to max detail:

DEBUG - 2009-04-21 22:54:16 --&gt; URI Class Initialized
ERROR - 2009-04-21 22:54:16 --&gt; 404 Page Not Found --&gt; peticion
#5

[eluser]umefarooq[/eluser]
hi check the following user guide link where GET is not allowed in CI for security reasons

http://ellislab.com/codeigniter/user-gui...urity.html
#6

[eluser]iNfLuX[/eluser]
Try to write a script that is not a part of CI that will handle this callback.
hash the $_GET value with base64 and then pass it back to CI.
#7

[eluser]Uto[/eluser]
[quote author="umefarooq" date="1240365678"]hi check the following user guide link where GET is not allowed in CI for security reasons

http://ellislab.com/codeigniter/user-gui...urity.html[/quote]

Yep, I've read that, I'm just looking for a way to skip that for a single controller, like a special config file for just one controller. Otherwise I'll have to make all the callback process as an external php file, what means having to rewrite a lot of code I already have as models and helpers, and having to mantain two sets of code for the same thing.
#8

[eluser]Uto[/eluser]
[quote author="iNfLuX" date="1240365821"]Try to write a script that is not a part of CI that will handle this callback.
hash the $_GET value with base64 and then pass it back to CI.[/quote]

Hmm, that sounds a nice walkaround, I will try it thanks Smile

Actually, I can even convert the GET in POST and skip the problem that way Smile
#9

[eluser]cahva[/eluser]
I remember this thread earlier and it should help you out:
http://ellislab.com/forums/viewthread/108089/
#10

[eluser]Uto[/eluser]
[quote author="cahva" date="1240366207"]I remember this thread earlier and it should help you out:
http://ellislab.com/forums/viewthread/108089/[/quote]

Oh yeh, after reading that thread I've found there are actually many ways, and the cleanest one seems to be using hooks, so I'm heading towards reading hooks documentation (I never ever needed them yet).

Thanks Smile




Theme © iAndrew 2016 - Forum software by © MyBB