public function getTransactionId() { return $this->_transactionContext->getTransactionId(); }
public function __construct(Customweb_Payment_Authorization_ITransactionContext $transactionContext) { $this->transactionContext = $transactionContext; $this->transactionId = $transactionContext->getTransactionId(); $this->authorizationAmount = $transactionContext->getOrderContext()->getOrderAmountInDecimals(); $this->currencyCode = $transactionContext->getOrderContext()->getCurrencyCode(); $this->createdOn = new Customweb_Date_DateTime(); $this->externalTransactionId = $this->generateExternalId(); $skus = array(); foreach ($this->getTransactionContext()->getOrderContext()->getInvoiceItems() as $item) { if (isset($skus[$item->getSku()])) { throw new Exception("Could not start transaction because there are multiple line items with the same SKU."); } $skus[$item->getSku()] = $item->getSku(); } }