public function recurringAuth($data) { DB::getConn()->transactionStart(); try { $this->TxnType = "Auth"; $this->AuthAmount = 1.0; $this->write(); $adapter = new DPSAdapter(); $inputs = $this->prepareDPSHostedRecurringAuthRequest($data); $adapter->doDPSHostedPayment($inputs, $this); } catch (Exception $e) { DB::getConn()->transactionRollback(); $this->handleError($e); } }
function dpshostedPurchase($data) { DB::getConn()->transactionStart(); try { $this->TxnType = "Purchase"; $this->write(); $adapter = new DPSAdapter(); $inputs = $this->prepareDPSHostedRequest($data); return $adapter->doDPSHostedPayment($inputs, $this); } catch (Exception $e) { DB::getConn()->transactionRollback(); $this->handleError($e); } }