예제 #1
0
파일: Omise.php 프로젝트: piranon/gae
 public function get_transaction($id)
 {
     try {
         $displayResult = OmiseTransaction::retrieve($id);
     } catch (OmiseException $e) {
         $displayResult = $e->getMessage();
     }
     return $displayResult;
 }
예제 #2
0
 /**
  * Assert that a transaction object is returned after a successful retrieve with transaction id.
  * And validate json structure that's return back.
  *
  */
 public function testValidateOmiseTransactionObjectRetrievedStructure()
 {
     $transaction = OmiseTransaction::retrieve('trxn_test_4zmrjhlflnz6id6q0bo');
     $this->assertArrayHasKey('object', $transaction);
     $this->assertArrayHasKey('id', $transaction);
     $this->assertArrayHasKey('type', $transaction);
     $this->assertArrayHasKey('amount', $transaction);
     $this->assertArrayHasKey('currency', $transaction);
     $this->assertArrayHasKey('created', $transaction);
 }
예제 #3
0
<?php

$transactions = OmiseTransaction::retrieve('trxn_test_4xuy2z4w5vmvq4x5pfs');
예제 #4
0
 /**
  * Get transaction list from Omise server
  * @return OmiseTransaction|array
  */
 public function getOmiseTransactionList()
 {
     // Load `omise-php` library.
     $this->load->library('omise/omise-php/lib/Omise');
     // Load language.
     $this->language->load('payment/omise');
     // Get Omise Keys.
     if ($keys = $this->_getOmiseKeys()) {
         try {
             $omise = OmiseTransaction::retrieve('', $keys['public_key'], $keys['secret_key']);
             return $omise;
         } catch (Exception $e) {
             return array('error' => $e->getMessage());
         }
     } else {
         return $this->_error($this->language->get('error_extension_disabled'));
     }
 }
예제 #5
0
<?php

$transactions = OmiseTransaction::retrieve();