Returns an array of payment methods
@return array
1612
protected function getListPayment()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            $list = $this->payment->getList();
            $this->limitArray($list);
            return $list;
        }

        $method = $this->payment->get($id);

        if (empty($method)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($method);
    }
119779
protected function getPaymentTransactionStructure()
    {
        return [
            'usage'              => $this->usage,
            'remote_ip'          => $this->remote_ip,
            'return_success_url' => $this->return_success_url,
            'return_failure_url' => $this->return_failure_url,
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'consumer_reference' => $this->consumer_reference,
            'national_id'        => $this->national_id,
            'birth_date'         => $this->birth_date,
            'customer_email'     => $this->customer_email,
            'billing_address'    => $this->getBillingAddressParamsStructure(),
            'shipping_address'   => $this->getShippingAddressParamsStructure()
        ];
    }
728015
public function payments()
    {
        return $this->client->customerPayments->listFor($this, null, null, $this->getPresetOptions());
    }
177094
protected function getPaymentTransactionStructure()
    {
        return [
            'usage'              => $this->usage,
            'remote_ip'          => $this->remote_ip,
            'return_success_url' => $this->return_success_url,
            'return_failure_url' => $this->return_failure_url,
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'consumer_reference' => $this->consumer_reference,
            'customer_email'     => $this->customer_email,
            'iban'               => $this->iban,
            'bic'                => $this->bic,
            'billing_address'    => $this->getBillingAddressParamsStructure(),
            'shipping_address'   => $this->getShippingAddressParamsStructure()
        ];
    }
842138
public function GetValidPaymentMethodsSelectableByTheUser()
    {
        $oPaymentMethods = clone $this->GetValidPaymentMethods(true);
        $aInvalidMethods = array();
        $oPaymentMethods->GoToStart();
        while ($oPaymentMethod = $oPaymentMethods->Next()) {
            $oHandler = $oPaymentMethod->GetFieldShopPaymentHandler();
            if ($oHandler && $oHandler->isBlockForUserSelection()) {
                $aInvalidMethods[] = MySqlLegacySupport::getInstance()->real_escape_string($oPaymentMethod->id);
            }
        }
        if (count($aInvalidMethods) > 0) {
            $oPaymentMethods->AddFilterString("`shop_payment_method`.`id` NOT IN ('".implode("','", $aInvalidMethods)."')");
        }
        $oPaymentMethods->GoToStart();

        return $oPaymentMethods;
    }
999951
public function getPaymentList()
    {
        if ($this->_oPaymentList === null) {
            $this->_oPaymentList = false;

            $sActShipSet = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sShipSet');
            if (!$sActShipSet) {
                $sActShipSet = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sShipSet');
            }

            $oBasket = $this->getSession()->getBasket();

            // load sets, active set, and active set payment list
            list($aAllSets, $sActShipSet, $aPaymentList) =
                \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DeliverySetList::class)->getDeliverySetData($sActShipSet, $this->getUser(), $oBasket);

            $oBasket->setShipping($sActShipSet);

            // calculating payment expences for preview for each payment
            $this->_setValues($aPaymentList, $oBasket);
            $this->_oPaymentList = $aPaymentList;
            $this->_aAllSets = $aAllSets;
        }

        return $this->_oPaymentList;
    }
85209
protected function getPaymentTransactionStructure()
    {
        return [
            'reference_id' => $this->reference_id,
            'amount'       => $this->transformAmount($this->amount, $this->currency),
            'currency'     => $this->currency
        ];
    }
127895
protected function GetJsMethods()
    {
        $aData = array();
        $aData['aid'] = $this->GetConfigParameter('aid');
        $aData['encoding'] = $this->GetConfigParameter('encoding');
        $aData['mid'] = $this->GetConfigParameter('mid');
        $aData['mode'] = $this->GetConfigParameter('mode');
        $aData['portalid'] = $this->GetConfigParameter('portalid');
        $aData['request'] = 'creditcardcheck';
        $aData['storecarddata'] = 'yes';
        ksort($aData);

        $sHashData = implode('', $aData);
        $sHashData .= $this->GetConfigParameter('key');

        $hash = md5($sHashData);

        $sPayOneMessageLanguageISO = $this->GetCurrentLanguageCode();

        $oPaymentMethod = TdbShopPaymentMethod::GetNewInstance();
        /** @var $oPaymentMethod TdbShopPaymentMethod */
        $oPaymentMethod->LoadFromField('name_internal', 'credit_card_payone');

        $sTmpJs = "
        <script type=\"text/javascript\">

        var data = {
          request : 'creditcardcheck',
          mode : '".TGlobal::OutJS($this->GetConfigParameter('mode'))."',
          mid : '".TGlobal::OutJS($this->GetConfigParameter('mid'))."',
          aid : '".TGlobal::OutJS($this->GetConfigParameter('aid'))."',
          portalid : '".TGlobal::OutJS($this->GetConfigParameter('portalid'))."',
          encoding : '".TGlobal::OutJS($this->GetConfigParameter('encoding'))."',
          storecarddata : 'yes',
          hash : '".TGlobal::OutJS($hash)."'
        }

        var options = {
          return_type : 'object',
          callback_function_name : 'processPayoneResponse'
        }
        function processPayoneResponse(response) {
          // if (console != undefined) { console.log(response); }

          switch(response.get('status')) {
            case 'VALID':
              var oCreditCardNumber = document.forms.checkout.elements['aPayment[creditCardNumber]'];
              oCreditCardNumber.value = response.get('truncatedcardpan');

              var oTruncatedcardpan = document.forms.checkout.elements['aPayment[truncatedcardpan]'];
              oTruncatedcardpan.value = response.get('truncatedcardpan');

              var oPseudocardpan = document.forms.checkout.elements['aPayment[pseudocardpan]'];
              oPseudocardpan.value = response.get('pseudocardpan');


              // collect card-type data
              var oCreditCardTypePayone = document.forms.checkout.elements['payone[creditCardType]'];
              for (var i=0; i < oCreditCardTypePayone.length; i++) {
                if (oCreditCardTypePayone[i].checked) {
                  sTmpVal = oCreditCardTypePayone[i].value;
                }
              }

              var oCreditCardType = document.forms.checkout.elements['aPayment[creditCardType]'];
              oCreditCardType.value = sTmpVal;

              // collect card owner
              var oCreditCardOwner = document.forms.checkout.elements['aPayment[creditCardOwnerName]'];
              oCreditCardOwner.value = document.forms.checkout.elements['payone[creditCardOwnerName]'].value;
              ";

        if ($this->bSubmitExpireDateToShop) {
            $sTmpJs .= "
              // collect card-expiration month
              $('#selectList').val();
              var sCreditCardValidToMonthPayone = document.forms.checkout.elements['payone[creditCardValidToMonth]'][document.forms.checkout.elements['payone[creditCardValidToMonth]'].selectedIndex].text;

              var oCreditCardValidToMonth = document.forms.checkout.elements['aPayment[creditCardValidToMonth]'];
              oCreditCardValidToMonth.value = sCreditCardValidToMonthPayone;

              // collect card-expiration year
              var sCreditCardValidToYearPayone = '';
              var sCreditCardValidToYearPayone = document.forms.checkout.elements['payone[creditCardValidToYear]'][document.forms.checkout.elements['payone[creditCardValidToYear]'].selectedIndex].text;

              var oCreditCardValidToYear = document.forms.checkout.elements['aPayment[creditCardValidToYear]'];
              oCreditCardValidToYear.value = sCreditCardValidToYearPayone;
              ";
        }

        $sTmpJs .= "
              // reset payone fields
              document.forms.checkout.elements['payone[creditCardNumber]'].value = '';
              document.forms.checkout.elements['payone[creditCardChecksum]'].value = '';
              document.forms.checkout.elements['payone[creditCardValidToMonth]'].selectedIndex = 0;
              document.forms.checkout.elements['payone[creditCardValidToYear]'].selectedIndex = 0;

              document.forms.checkout.submit();
              break;
            case 'INVALID':
               ".$this->GetJSMessageMethodCall("response.get('customermessage')")."
            case 'ERROR':
              //alert('Response status '+response.get('status') +' '+ response.get('errorcode') +' '+ response.get('errormessage') +' '+ response.get('customermessage') );
              ".$this->GetJSMessageMethodCall("response.get('customermessage')").'
              break;
            default:
              '.$this->GetJSMessageMethodCall("'".TGlobal::Translate('chameleon_system_shop.payment_payone.error_unknown')."'")."
              break;
          }
        }
        function Send() {
          var oForm = document.forms.checkout;

          // check if card validation / pseudocardpan already exists
          if(IsCreditCardPaymentAndCardAlreadyValidated()) {
            oForm.submit();
            return true;
          } else {

            var oCreditCardType = oForm.elements['payone[creditCardType]'];
            var sTmpVal = '';

            //collect card-type data
            for (var i=0; i < oCreditCardType.length; i++) {
              if (oCreditCardType[i].checked) {
                sTmpVal = oCreditCardType[i].value;
              }
            }

            if (sTmpVal.length < 1) {
              ".$this->GetJSMessageMethodCall("'".TGlobal::Translate('chameleon_system_shop.payment_payone.error_no_card_type')."'")."
              return false;
            } else {
              data.cardtype = sTmpVal;
            }

            var oCreditCardOwnerName = oForm.elements['payone[creditCardOwnerName]'];
            if (oCreditCardOwnerName.value.length < 1) {
              ".$this->GetJSMessageMethodCall("'".TGlobal::Translate('chameleon_system_shop.payment_payone.error_no_card_owner')."'")."
              oCreditCardOwnerName.focus();
              return false;
            } else {
              data.cardholder = oCreditCardOwnerName.value;
            }

            var oCreditCardNumber = oForm.elements['payone[creditCardNumber]'];
            if (oCreditCardNumber.value.length < 1) {
              ".$this->GetJSMessageMethodCall("'".TGlobal::Translate('chameleon_system_shop.payment_payone.error_no_card_number')."'")."
              oCreditCardNumber.focus();
              return false;
            } else {
              data.cardpan = oCreditCardNumber.value;
            }

            var oCreditCardValidToYear = oForm.elements['payone[creditCardValidToYear]'];
            var sCreditCardValidToYear = oCreditCardValidToYear.value+'';
            var sShortYear = sCreditCardValidToYear.slice(2, 4);
            var oCreditCardValidToMonth = oForm.elements['payone[creditCardValidToMonth]'];
            var sCreditCardValidToMonth = oCreditCardValidToMonth.value;
            if(sCreditCardValidToMonth.length == 1) sCreditCardValidToMonth = '0' + sCreditCardValidToMonth;

            data.cardexpiredate = sShortYear + sCreditCardValidToMonth;

            var oCreditCardChecksum = oForm.elements['payone[creditCardChecksum]'];
            if (oCreditCardChecksum.value.length < 1) {
              ".$this->GetJSMessageMethodCall("'".TGlobal::Translate('chameleon_system_shop.payment_payone.error_no_card_checksum')."'")."
              oCreditCardChecksum.focus();
              return false;
            } else {
              data.cardcvc2 = oCreditCardChecksum.value;
            }

            data.language = '".TGlobal::OutJS($sPayOneMessageLanguageISO)."';

            var request = new PayoneRequest(data, options);
            request.checkAndStore();
          }
        }

        ";

        $sTmpJs .= $this->GetJSMessageMethod();
        $sTmpJs .= $this->GetJSMethodIsCreditCardPaymentAndCardAlreadyValidated($oPaymentMethod);

        $sJQueryButtonSelector = $this->GetNextButtonCSSSelector();

        $sTmpJs .= "
        $(document).ready(function() {
          $('#checkout').unbind();
          $('#checkout').submit(
              function() {
                Send();
              }
          );

          $('".$sJQueryButtonSelector."').removeAttr('onclick');
          $('".$sJQueryButtonSelector."').unbind();
          $('".$sJQueryButtonSelector."').click(function() { Send(); return false; });
        });

        </script>
      ";

        return explode('\n', $sTmpJs);
    }
940001
public function getPaymentMethodName()
    {
        $aVerifyData = (array) oxRegistry::getSession()->getVariable('pm_verify');
        $sMethodName = array_key_exists('pm_paymentMethod_name', $aVerifyData)
            ? (string) $aVerifyData['pm_paymentMethod_name']
            : '';

        return $sMethodName;
    }
712473
public function getRDFaPaymentMethods()
    {
        $price = $this->getProduct()->getPrice()->getBruttoPrice();
        $paymentList = oxNew(\OxidEsales\Eshop\Application\Model\PaymentList::class);
        $paymentList->loadRDFaPaymentList($price);

        return $paymentList;
    }
865367
protected function getMethods()
    {
        if ($this->option('plain')) {
            return [];
        }

        $methods = ['all', 'find', 'create', 'update', 'delete'];

        if (($only = $this->option('only')) && $only != '') {
            $methods = array_flip(array_only(array_flip($methods), $this->getArray($only)));
        }

        if (($except = $this->option('except')) && $except != '') {
            $methods = array_flip(array_except(array_flip($methods), $this->getArray($except)));
        }

        return $methods;
    }
876758
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'customer_email'     => $this->customer_email,
            'customer_phone'     => $this->customer_phone,
            'holder_name'        => $this->holder_name,
            'iban'               => $this->iban,
            'swift_code'         => $this->swift_code,
            'account_number'     => $this->account_number,
            'bank_name'          => $this->bank_name,
            'bank_city'          => $this->bank_city,
            'bank_code'          => $this->bank_code,
            'branch_code'        => $this->branch_code,
            'branch_check_digit' => $this->branch_check_digit,
            'billing_address'    => $this->getBillingAddressParamsStructure(),
            'shipping_address'   => $this->getShippingAddressParamsStructure()
        ];
    }
750298
protected function getCustomSortingList() : array
    {
        $arEventResult = Event::fire('shopaholic.sorting.offer.get.list', [$this->sValue]);
        if (empty($arEventResult)) {
            return [];
        }

        $arElementIDList = [];
        foreach ($arEventResult as $arEventOfferIDList) {
            if (empty($arEventOfferIDList) || !is_array($arEventOfferIDList)) {
                continue;
            }

            $arElementIDList = $arEventOfferIDList;
            break;
        }

        return $arElementIDList;
    }
427493
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'              => $this->transformAmount($this->amount, $this->currency),
            'currency'            => $this->currency,
            'customer_account_id' => $this->customer_account_id,
            'return_url'          => $this->return_url,
            'customer_email'      => $this->customer_email,
            'customer_phone'      => $this->customer_phone,
            'billing_address'     => $this->getBillingAddressParamsStructure(),
            'shipping_address'    => $this->getShippingAddressParamsStructure()
        ];
    }
317592
public function getPaymorrowBasketLineItems()
    {
        /** @var OxpsPaymorrowOxBasket|oxBasket $this */

        $aBasketContents = $this->getContents();

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

        $iLineItemCount = 1; // must start from 1
        $aLineItems     = array();

        /** @var oxBasketItem|OxpsPaymorrowOxBasketItem $oBasketItem */
        foreach ( $aBasketContents as $oBasketItem ) {
            $aLineItems = array_merge( $aLineItems, $oBasketItem->getPaymorrowBasketItemSummary( $iLineItemCount ) );

            $iLineItemCount++;
        }

        /**
         * Checks for additional Payment, Wrapping, Gift Card, Delivery/Shipping, Vouchers,
         * TS Protection - costs
         */
        $aLineItems = array_merge( $aLineItems, $this->_getPaymorrowAdditionalCostsSummary( $iLineItemCount ) );

        return $aLineItems;
    }
206441
public function getPaymentMethods()
    {
        $this->quote->setStoreId($this->storeManager->getStore()->getId());

        $export         = [];
        $paymentMethods = $this->paymentModel->getAvailableMethods($this->quote);

        foreach ($paymentMethods as $method) {
            $export[] = [
                'id'        => $method->getCode(),
                'title'     => $method->getTitle(),
                'is_active' => 1
            ];
        }

        return $export;
    }
120195
public function getPaymentMethodGroups()
    {
        $response = $this->sendRequest(
            $this->serviceBaseUrl . 'GetPaymentMethods',
            ['MerchantLogin' => $this->auth->getMerchantLogin(), 'Language' => $this->culture],
            $this->requestMethod
        );

        $sxe = simplexml_load_string($response);
        $this->parseError($sxe);

        if (!$sxe->Methods->Method) {
            return [];
        }
        $methods = [];
        foreach ($sxe->Methods->Method as $method) {
            $methods[(string)$method->attributes()->Code] = (string)$method->attributes()->Description;
        }
        return $methods;
    }