I make a API Restful with codeigniter-restserverto recieve POST request from another website, the scema is after sent response json i must redirect to another website to confirm that I have received transaction_id and signature_id
my code like this
/ untuk menambah person menaggunakan method post
public function notification_post(){
//untuk menerima data
$result = json_decode(file_get_contents('php://input'), true);
$order_id = $result['order_id'];
$transaction_id = $result['transaction_id'];
$signature_key = $result['signature_key'];
$response = $this->km->confirm_payment(
$order_id,
$transaction_id,
$signature_key
);
$this->response($response);
//sent to v2/update
$confirm_order = array(
'transaction_id' => $transaction_id,
'signature_key' => $signature_key,
);
//redirect ke halaman confirm
$link = 'http://68731fea.ngrok.io/matoa-admin/transaksi/confirm';
redirect($link, 'location');
}
the problem is, how can i redirect to $link after sent $this->response($response);