コード例 #1
0
ファイル: test.php プロジェクト: Owain94/Webshop
 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);
 }
コード例 #2
0
ファイル: store.php プロジェクト: Owain94/Webshop
 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);
 }