return an array with all parameters required by easy cash for the payment execution.

@param TdbShopOrder $oOrder
@param null         $dPaymentAmount

@return array
160258
protected function GetPaymentPayload($oOrder, $dPaymentAmount = null)
    {
        $aPayload = parent::GetPaymentPayload($oOrder, $dPaymentAmount);
        $aPayload['AccNr'] = str_replace(' ', '', $this->aPaymentUserData['accountNr']);
        $aPayload['AccIBAN'] = str_replace(' ', '', $this->aPaymentUserData['bankNr']);
        $aPayload['AccBank'] = $this->aPaymentUserData['bankName'];
        $aPayload['AccOwner'] = $this->aPaymentUserData['accountOwner'];

        return $aPayload;
    }
563519
public function GetBasketSumForVoucher(TdbShopVoucher &$oVoucher)
    {
        // get the sum of all products (if the voucher is not sponsored, we exclude products with "ExcludeFromVouchers")
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();
        $oVoucherDef = &$oVoucher->GetFieldShopVoucherSeries();
        $dProductValue = 0;
        while ($oItem = &$this->Next()) {
            $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem);
            if ($bIncludeProduct) {
                $dProductValue = $dProductValue + $oItem->dPriceTotalAfterDiscountWithoutVouchers;
            }
        }
        $this->setItemPointer($iCurrentPosition);

        return $dProductValue;
    }
677349
protected function getOrderFromPayment($orderPayment)
    {
        $orderId = null;
        $order = null;
        if (!is_null($orderPayment)) {
            $orderId = $orderPayment->getOrderId();
        }
        if (!is_null($orderId)) {
            $order = oxNew(\OxidEsales\PayPalModule\Model\PayPalOrder::class);
            $order->setOrderId($orderId);
            $order->load();
        }

        return $order;
    }
87808
public function ExecutePayment(TdbShopOrder &$oOrder, $sMessageConsumer = '')
    {
        $bPaymentOk = parent::ExecutePayment($oOrder);
        if ($bPaymentOk) {
            TdbShopPaymentHandler::SetExecutePaymentInterrupt(true);
            $bPaymentOk = $this->ExecuteIPaymentCall($oOrder);
        }

        return $bPaymentOk;
    }
273141
protected function getArticle(TdbShopOrderItem $oOrderItem, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled)
    {
        $aArticle = array();
        $oArticle = &$oOrderItem->GetFieldShopArticle();

        $aArticle['iAmount'] = $oOrderItem->fieldOrderAmountFormated;
        $aArticle['sManufacturer'] = $oOrderItem->fieldShopManufacturerName;
        $aArticle['sArticleName'] = $oOrderItem->fieldName;
        $aArticle['sArticleVariantName'] = $oOrderItem->fieldNameVariantInfo;
        $aArticle['sShippingInformation'] = '';
        $aArticle['sPrice'] = $oOrderItem->fieldOrderPriceFormated;
        $aArticle['sPriceTotal'] = $oOrderItem->fieldOrderPriceTotalFormated;
        $aArticle['sVat'] = $oOrderItem->fieldVatPercentFormated;
        $aArticle['sVatFormatted'] = number_format($oOrderItem->fieldVatPercent, 0, '.', '').'%';
        if ($oArticle) {
            $aArticle['sImageId'] = $this->getArticleImageId($oArticle, $oCacheTriggerManager, $bCachingEnabled);
            $aArticle = $this->GetVariantInfo($oArticle, $aArticle, $oCacheTriggerManager, $bCachingEnabled);
            $aArticle['sArticleDetailURL'] = $oArticle->GetDetailLink($this->bAbsoluteArticleUrls);
            if ($bCachingEnabled) {
                $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);
            }
        }
        if ($oOrderItem instanceof IPkgShopOrderItemWithCustomData) {
            $aArticle['customData'] = $oOrderItem->getCustomDataForTwigOutput();
            $aArticle['customDataTwigTemplate'] = $oOrderItem->getCustomDataTwigTemplate();
        }

        return $aArticle;
    }
330973
protected function GetUserPaymentData()
    {
        $oGlobal = TGlobal::instance();
        if ($oGlobal->UserDataExists(TdbShopPaymentHandler::URL_PAYMENT_USER_INPUT)) {
            $this->aPaymentUserData = $oGlobal->GetUserData(TdbShopPaymentHandler::URL_PAYMENT_USER_INPUT);
            if (!is_array($this->aPaymentUserData)) {
                $this->aPaymentUserData = array();
            }
        } elseif (is_null($this->aPaymentUserData)) {
            $this->aPaymentUserData = $this->GetDefaultUserPaymentData();
        }

        return $this->aPaymentUserData;
    }
1019871
protected function _loadPaymentMethodSurcharge( $sPaymentId )
    {
        /** @var oxPayment $oPaymentMethod */
        $oPaymentMethod = oxNew( 'oxPayment' );

        if ( !$oPaymentMethod->load( $sPaymentId ) or !$oPaymentMethod->getId() ) {
            return array();
        }

        $oPaymentMethod->calculate( $this );
        $oSurchargePrice = $oPaymentMethod->getPrice();

        if ( empty( $oSurchargePrice ) ) {
            return array();
        }

        return $oSurchargePrice;
    }
29720
public function ExecutePayment(TdbShopOrder &$oOrder, $sMessageConsumer = '')
    {
        $bPaymentOk = parent::ExecutePayment($oOrder);
        if ($bPaymentOk) {
            if ($oOrder->fieldValueTotal * 100 == $this->sAuthorisedAmount) {
                $bPaymentOk = $this->ExecuteDataTransPaymentCall($oOrder);
            } else {
                $oMsgManager = TCMSMessageManager::GetInstance();
                $oMsgManager->AddMessage($sMessageConsumer, 'ERROR_PAYMENT_DATA_TRANS_ORDER_REQUEST_AMOUNT_CHANGE');
                $bPaymentOk = false;
            }
        }

        return $bPaymentOk;
    }
1005270
public AbucoinsPaymentMethod[] getPaymentMethods() throws IOException {
    AbucoinsPaymentMethods paymentMethods =
        abucoinsAuthenticated.getPaymentMethods(
            exchange.getExchangeSpecification().getApiKey(),
            signatureCreator,
            exchange.getExchangeSpecification().getPassword(),
            timestamp());

    if (paymentMethods.getPaymentMethods().length == 1
        && paymentMethods.getPaymentMethods()[0].getMessage() != null)
      throw new ExchangeException(paymentMethods.getPaymentMethods()[0].getMessage());
    return paymentMethods.getPaymentMethods();
  }
1301294
public function getPaymentDetailAction(PayoneGetPaymentDetailTransfer $getPaymentDetailTransfer)
    {
        if (!empty($getPaymentDetailTransfer->getOrderReference())) {
            $order = SpySalesOrderQuery::create()
                ->filterByOrderReference($getPaymentDetailTransfer->getOrderReference())
                ->findOne();
            $getPaymentDetailTransfer->setOrderId($order->getIdSalesOrder());
        }
        $response = $this->getFacade()->getPaymentDetail($getPaymentDetailTransfer->getOrderId());
        $getPaymentDetailTransfer->setPaymentDetail($response);
        return $getPaymentDetailTransfer;
    }
543507
public function getSoftDescriptor(\TdbShopOrder $order, $invoiceNumber = null)
    {
        $text = $this->getValue('softDescriptor');
        $data = $this->getTemplateDataFromOrder($order);
        $data['invoiceNumber'] = $invoiceNumber;

        return mb_substr($this->render($text, $data), 0, 16);
    }
1049240
protected function ExecuteIPaymentCall($oOrder)
    {
        $parameters = $this->GetPayFieldParameter(array(), $oOrder);
        $requestUrl = $this->GetRequestURL();
        $url = $requestUrl.$this->getUrlUtil()->getArrayAsUrl($parameters, '?', '&');
        $this->getRedirect()->redirect($url);
    }
59185
public function executePayment($dAmount, & $oOrder)
    {
        /** @var oxUserPayment|OxpsPaymorrowOxUserPayment $oUserPayment */
        $oUserPayment = $this->_oPaymentInfo;

        if (is_object($oUserPayment) && $oUserPayment->isUserPaymentPaymorrowMethod()) {

            // Set real order ID (OXID field) to session to be used in order confirmation during payment.
            $oOrderId = $oOrder->getId();
            $oOrder->savePaymorrowTemporaryOrderIdToSession($oOrderId);

            /** @var OxpsPaymorrowModule $oModule */
            $oModule = oxRegistry::get('OxpsPaymorrowModule');

            /** @var OxpsPaymorrowRequestControllerProxy $oPmRequestControllerProxy */
            $oPmRequestControllerProxy = oxNew('OxpsPaymorrowRequestControllerProxy');
            $oPmRequestControllerProxy->confirmOrder($oModule->getPaymentMethodName(), $oOrderId);

            /** @var OxpsPaymorrowResponseHandler $oPmResponseHandler */
            $oPmResponseHandler = oxRegistry::get('OxpsPaymorrowResponseHandler');

            /**
             * If Order has an error after validation from Paymorrow services invalidate order and delete it
             * If Payment data save failed return an error
             */
            if ($oPmResponseHandler->hasErrors() or
                !$this->_savePaymorrowUserPaymentData($oOrder, $oPmResponseHandler)
            ) {
                $this->_handleOrderResponseErrors($oPmResponseHandler);

                return false;
            }
        }

        return $this->_OxpsPaymorrowOxPaymentGateway_executePayment_parent($dAmount, $oOrder);
    }
440050
protected function SendFailureSettlementMail(TdbShopOrder &$oOrder)
    {
        $bSendMail = false;
        $oMail = TdbDataMailProfile::GetProfile('payment_datatrans_error_settlement');
        if (!is_null($oMail)) {
            $sInfo = TGlobal::OutHTML(TGlobal::Translate('chameleon_system_shop.payment_data_trans.settlement_failure_mail_info',
                    array(
                        '%ordernumber%' => $oOrder->fieldOrdernumber,
                        '%ref%' => $this->GetRefNoParameter(false),
                    )
                ));
            $oMail->AddData('sInfo', $sInfo);
            $bSendMail = $oMail->SendUsingObjectView('emails', 'Customer');
        }

        return $bSendMail;
    }
1368966
protected function GetPaymentParameter()
    {
        $oBasket = TShopBasket::GetInstance();
        $sCurrency = $this->GetCurrencyIdentifier();

        if (isset($this->aXMLResponseData['ORDERID'])) {
            if (isset($this->aPaymentUserData['OrderIncrease'])) {
                $this->aPaymentUserData['OrderIncrease'] = $this->aPaymentUserData['OrderIncrease'] + 1;
            } else {
                $this->aPaymentUserData['OrderIncrease'] = 1;
            }
            $sOrderId = $oBasket->sBasketIdentifier.'-'.$this->aPaymentUserData['OrderIncrease'];
        } else {
            $sOrderId = $oBasket->sBasketIdentifier;
        }
        /** @var Request $request */
        $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest();
        $sUserIpAddress = $request->getClientIp();
        $aParameter = array('PSPID' => $this->GetConfigParameter('user_id'), //required
            'ORDERID' => $sOrderId, //required
            'USERID' => $this->GetConfigParameter('api_user_id'), //required
            'PSWD' => $this->GetConfigParameter('pswd'), //required
            'AMOUNT' => round($oBasket->dCostTotal * 100), //required - order value multiplied by 100 because we won't have any thousand or decimal separators
            'CURRENCY' => $sCurrency, //required
            'ALIAS' => $this->aPaymentUserData['ALIAS'], 'OPERATION' => 'RES', //required - use RES for reservation or SAL for direct booking (sell) (overrides ogone backend account setting)
            'REMOTE_ADDR' => $sUserIpAddress, 'RTIMEOUT' => 60, );

        $aParameter = array_merge($aParameter, $this->Get3DSecureParameter());

        // generate the hash
        $aParameter['SHASign'] = $this->BuildOutgoingHash($aParameter);

        return $aParameter;
    }
1071733
private function serializePaymentDataGooglePay(PaymentDataGooglePay $paymentData)
    {
        $result = array(
            'type'                  => $paymentData->getType(),
            'payment_method_token'  => $paymentData->getPaymentMethodToken(),
            'google_transaction_id' => $paymentData->getGoogleTransactionId(),
        );

        return $result;
    }
764878
public function capture($oOrder = null, $aRequestParameters = array())
    {
        $oData = $this->_callOrderRequest(
            'capture',
            $oOrder,
            $aRequestParameters,
            array(
                'amazon_authorization_id',
                'capture_amount',
                'currency_code',
                'capture_reference_id',
                'seller_capture_note'
            ),
            $blProcessable
        );

        //Update Order info
        if ($blProcessable === true && isset($oData->CaptureResult->CaptureDetails)) {
            $this->setCaptureState($oOrder, $oData->CaptureResult->CaptureDetails);
            $this->closeOrderReference($oOrder, array(), false);
        }

        return $oData;
    }