Ejemplo n.º 1
0
/**
 * 2016-03-27
 * @param OrderInterface|Order $order
 * @param int $transactionId
 * @param $allowNull [optional]
 * @return Invoice|null
 */
function df_invoice_by_transaction(OrderInterface $order, $transactionId, $allowNull = false)
{
    /** @var Invoice|null $result */
    $result = df_ftn(DfPayment::getInvoiceForTransactionId($order, $transactionId));
    df_assert($allowNull || $result);
    return $result;
}
Ejemplo n.º 2
0
 /**
  * 2016-07-12
  * @return void
  */
 private function capture()
 {
     /** @var IOP|OP $payment */
     $payment = $this->payment();
     /** @var Method $method */
     $method = $payment->getMethodInstance();
     $method->setStore($this->order()->getStoreId());
     DfPayment::processActionS($payment, M::ACTION_AUTHORIZE_CAPTURE, $this->order());
     DfPayment::updateOrderS($payment, $this->order(), Order::STATE_PROCESSING, $this->order()->getConfig()->getStateDefaultStatus(Order::STATE_PROCESSING), $isCustomerNotified = true);
 }