0

I am integrating instamojo payment gateway in website.i am using codeigniter framework.

I passed redirect URL as

http://localhost/example/instapayment/redirect

So i get response as follow:

http://localhost/example/instapayment/redirect?payment_id=MOJO612323222&status=success

i am redirecting to base_url. My route is

$route['redirect/(:any)'] = 'instapayment/redirect/$1';

Now i am not getting how to access status and payment_id.

1
  • The CI way: $this->input->get('payment_id') Commented May 4, 2016 at 9:17

2 Answers 2

1

if you have to pass the value you should enter url like this

localhost/yoururl/index.php/products_controller/delete_controller/70

and in controller function you can read like this

function delete_controller( $product_id = NULL ) {
 echo $product_id;
}
Sign up to request clarification or add additional context in comments.

Comments

0

http://localhost/example/instapayment/redirect?payment_id=MOJO612323222&status=success

if passing the variable in url that is bad practice , still if u want this u can use

$this->input->post() //for post menthod

$this->input->get()// for get method

2 Comments

i am not passing variable in url.my payment gateway giving me response like this.$this->input->get() not working
for payment_id u must use $this->input->get('payment_id') same for status

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.