/**
  * Process a transaction.
  *
  * <code>
  * $context = "com_crowdfunding.transaction.process";
  *
  * $data = array(
  *    'txn_id' => 'TXN123456',
  *    'txn_amount' => '100',
  *    'txn_currency' => 'EUR',
  * //....
  * );
  *
  * // Create user transaction object based.
  * $transaction  = new Crowdfunding\Transaction\Transaction(\JFactory::getDbo());
  * $transaction->bind($data);
  *
  * $transactionManager = new Crowdfunding\Transaction\TransactionManager(\JFactory::getDbo());
  * $transactionManager->setTransaction($transaction);
  *
  * if ($transactionManager->process($context, $options)) {
  * // ...
  * }
  * </code>
  *
  * @param string $context
  * @param array $options
  *
  * @throws \RuntimeException
  */
 public function process($context, array $options = array())
 {
     if (!$this->transaction instanceof Transaction) {
         throw new \UnexpectedValueException('It is missing transaction object.');
     }
     // Implement JObservableInterface: Pre-processing by observers
     $this->observers->update('onBeforeProcessTransaction', array($context, &$this->transaction, &$options));
     $this->transaction->store();
     // Implement JObservableInterface: Post-processing by observers
     $this->observers->update('onAfterProcessTransaction', array($context, &$this->transaction, &$options));
 }