Welcome Guest, Not a member yet? Register   Sign In
Routing problem
#1

[eluser]cortina[/eluser]
I've got an issue with a URL containing a query string that's being appended by a third party payment processor when returning users to a site I'm building. The URL I want is:
Code:
http://www.mysite.com/checkout/complete
but the payment processor apends:
Code:
?oid=1234567
where 1234567 is an order number (always an integer).

According to the user guide I should be able to route this using a regex:
Code:
$route['checkout/(complete\?oid\=([0-9]+))'] = 'checkout/complete';

But I'm still getting 404's after trying a bunch of alternatives.
Does anyone have any suggestions?
TIA
Rob
#2

[eluser]cortina[/eluser]
Damn, 16 views and no replies Sad
Anyone???
Cheers
Rob
#3

[eluser]wiredesignz[/eluser]
Phew that took some trial and error settings wise. (never having used $_GET)

Try setting $config['uri_protocol'] = "PATH_INFO"; and removing your regex route altogether.
Also set $config['enable_query_strings'] = TRUE;

This worked to the point that I was able to use the query ?oid=12345 and get to the controller and the $_GET variable is set.
#4

[eluser]cortina[/eluser]
Nice one! That got it Smile
Cheers
Rob




Theme © iAndrew 2016 - Forum software by © MyBB