public function paymestatus() { $data = $this->data; $data['title'] = 'Payme Test'; $this->load->model('payme_model'); $result = $this->payme_model->GetActiveTransactions(); foreach ($result as $transaction) { $data['testdata'][] = PayMe::GetTransactionStatus($transaction['transid'], $transaction['hash']); } $this->load->template('test/index', $data); }
public function status($id) { $data = $this->data; $data['title'] = 'Checkout'; /* View payment status */ $this->load->model('Payme_model'); $transID = $this->input->get('transid', false); /* Cancel order */ $transactionDetails = $this->Payme_model->GetTransactionStatus($transID); if (!empty($transactionDetails)) { $status = PayMe::GetTransactionStatus($transactionDetails['transid'], $transactionDetails['hash']); if ($status['status'] == 'success') { $this->Webshop_model->SetOrderStatus($status['transid'], 1); $this->load->library('cart'); $this->cart->destroy(); } } $data['status'] = $status; $this->load->template('store/status', $data); }