loads the active payment method.
358963
protected function LoadActivePaymentMethod()
    {
        $oBasket = TShopBasket::GetInstance();
        $this->oActivePaymentMethod = &$oBasket->GetActivePaymentMethod();
        if (!is_null($this->oActiveShippingGroup)) {
            $iPaymentId = null;
            $bSelectionValid = true;
            if (array_key_exists('shop_payment_method_id', $this->aRequestData)) {
                $iPaymentId = $this->aRequestData['shop_payment_method_id'];
                // make sure the entry may be selected by the user
                $bSelectionValid = false;
                $oUserSelectablePaymentMethods = $this->oActiveShippingGroup->GetValidPaymentMethodsSelectableByTheUser();
                if (true == $oUserSelectablePaymentMethods->FindItemWithProperty('id', $iPaymentId)) {
                    if (is_null($this->oActivePaymentMethod) || !is_array($this->oActivePaymentMethod->sqlData) || $this->oActivePaymentMethod->id != $iPaymentId) {
                        $this->oActivePaymentMethod = TdbShopPaymentMethod::GetNewInstance();
                        if (!$this->oActivePaymentMethod->Load($iPaymentId)) {
                            $this->oActivePaymentMethod = null;
                        } else {
                            $bSelectionValid = true;
                        }
                    } else {
                        $bSelectionValid = true;
                    }
                }
            }
            if (true == $bSelectionValid) {
                // found one? make sure it is in the active shipping group
                $oList = $oBasket->GetAvailablePaymentMethods();
                if (!is_null($this->oActivePaymentMethod)) {
                    if (!$oList->IsInList($this->oActivePaymentMethod->id)) {
                        $this->oActivePaymentMethod = null;
                    }
                }

                // still nothing? just take the first one from the list
                if (is_null($this->oActivePaymentMethod)) {
                    $oList->GoToStart();
                    if ($oList->Length() > 0) {
                        $this->oActivePaymentMethod = &$oList->Current();
                    }
                }
            }
        } else {
            $this->oActivePaymentMethod = null;
        }
    }
1277100
public function load()
    {
        if (! file_exists($file = $this->getFileName())) {
            return collect();
        }

        return collect(json_decode(file_get_contents($file), true));
    }
691882
public function load()
    {
        try {
            $this->returnJson($this->getPicRegistry()->getLatestRuntimes());
        } catch (PortableElementException $e) {
            $this->returnJson($e->getMessage(), 500);
        }
    }
926334
public function initialize()
    {
        parent::initialize();

        $this->data->installmentCount = 1;
        $this->data->fundingInstrument = new stdClass();
        $this->data->fundingInstrument->method = self::METHOD_CREDIT_CARD;
    }
953857
private void loadMethod() {

		// load method with information from format string
		if (StringUtils.isNotBlank(this.format)) {

			final String[] parts = this.format.split(",");
			if (parts.length == 2) {

				final String fqcn       = parts[0].trim();
				final String methodName = parts[1].trim();

				try {

					final Class type = Class.forName(fqcn);
					this.method      = type.getMethod(methodName);

				} catch (Throwable t) {
					t.printStackTrace();
				}
			}
		}
	}
196937
public function selectPaymentMethodByCode($name)
    {
        if (!isset($this->_paymentMethodsArray))
            throw new Exception("No data loaded");
        foreach ($this->_paymentMethodsArray as $paymentMethod) {
            if ($paymentMethod["PaymentMethodCode"] == strtoupper($name)) {
                $this->_methodData = $paymentMethod;
                break;
            }
        }
        return $this;
    }
27772
public function load() {
		session_start();

		$this->loadSiteClass();
		$this->checkRedirect();
		$this->applyViewRenderer();

		$this->loadController();
		$this->render();

	}
1214185
protected function loadData(): void
	{
		$data = $this->store->read($this->sessionId);

		$this->sessionData = $data === false ? [] : $data;
	}
106198
public function view()
    {
        if (!userHasPermission('admin:invoice:payment:view')) {
            unauthorised();
        }

        // --------------------------------------------------------------------------

        $oUri          = Factory::service('Uri');
        $oPaymentModel = Factory::model('Payment', 'nails/module-invoice');

        // --------------------------------------------------------------------------

        $this->data['payment'] = $oPaymentModel->getById(
            $oUri->segment(5),
            ['expand' => $oPaymentModel::EXPAND_ALL]
        );

        if (!$this->data['payment']) {
            show404();
        }

        $this->data['page']->title = 'View Payment &rsaquo; ' . $this->data['payment']->ref;

        Helper::loadView('view');
    }
69457
public static function onActivate()
    {
        $sSql = "SELECT COUNT(OXID)
            FROM oxpayments
            WHERE OXID IN ('jagamazon', 'bestitamazon')";

        //Insert payment records to DB
        $iRes = self::_getDatabase()->getOne($sSql);

        if ($iRes !== false && (int)$iRes === 0) {
            self::_executeSqlFile('install.sql');

            //Update Views
            $oDbHandler = self::_getDbMetaDataHandler();
            $oDbHandler->updateViews();
        }

        $sPaymentTable = getViewName('oxpayments');
        $sSql = "UPDATE {$sPaymentTable} SET OXACTIVE = 1 
            WHERE OXID = 'bestitamazon'";

        //Make payment active
        self::_getDatabase()->execute($sSql);

        $oConfig = self::_getConfig();
        $sUpdateFrom = $oConfig->getShopConfVar('sUpdateFrom', null, self::TMP_DB_ID);

        if ($sUpdateFrom !== null) {
            $blRemoveTempVersionNumber = version_compare($sUpdateFrom, '2.2.2', '<')
                && self::_executeSqlFile('update_2.2.2.sql');

            if (version_compare($sUpdateFrom, '2.4.0', '<')
                && self::_executeSqlFile('update_2.4.0.sql')
            ) {
                $blRemoveTempVersionNumber = true;
                self::_deactivateOldModule();
            }

            if (version_compare($sUpdateFrom, '2.6.0', '<')) {
                $blRemoveTempVersionNumber = true;
                $sNewMode = ((string)self::_getConfig()->getConfigParam('sAmazonMode') === 'Sync') ?
                    bestitAmazonPay4OxidClient::BASIC_FLOW : bestitAmazonPay4OxidClient::OPTIMIZED_FLOW;

                self::_getConfig()->setConfigParam('sAmazonMode', $sNewMode);
            }

            if ($blRemoveTempVersionNumber === true) {
                self::_removeTempVersionNumberFromDatabase();
            }
        }

        // Keep signature after module deactivation on reactivate
        $sShopId = $oConfig->getShopId();
        $sSql = "SELECT OXVARVALUE
            FROM oxconfig
            WHERE OXVARNAME = 'sAmazonSignature'
              AND OXSHOPID = '{$sShopId}'";

        $sValue = self::_getDatabase()->getOne($sSql);

        if ($sValue !== false && $sValue !== '') {
            $sQuery = "UPDATE oxconfig SET OXVARTYPE = 'str' 
                WHERE OXVARNAME = 'sAmazonSignature'
                  AND OXSHOPID = '{$sShopId}'";

            self::_getDatabase()->execute($sQuery);
        }

        // copy multi currency option value from possible hidden feature to module config
        if ((bool)$oConfig->getConfigParam('blBestitAmazonPay4OxidEnableMultiCurrency') === true) {
            $oConfig->setConfigParam('blBestitAmazonPay4OxidEnableMultiCurrency', true);
            $oConfig->saveShopConfVar(
                'bool',
                'blBestitAmazonPay4OxidEnableMultiCurrency',
                true,
                $oConfig->getShopId(),
                'module:bestitamazonpay4oxid'
            );
        }

        self::clearTmp();
    }
1074464
def payment_orders
      xml do |xml|
        xml.css("paymentOrdersResult > paymentOrders > paymentOrder").map do |node|
          SubscriptionPaymentOrder.load_from_xml(node)
        end
      end
    end
573393
public void presentPaymentMethodSelection() {
        final Intent paymentMethodsIntent = mPaymentMethodsActivityStarter.newIntent()
                .putExtra(EXTRA_PAYMENT_SESSION_ACTIVE, true);
        mHostActivity.startActivityForResult(paymentMethodsIntent, PAYMENT_METHOD_REQUEST);
    }
443376
public function load() {
		if ( ! is_admin() ) {
			_doing_it_wrong(
				__METHOD__,
				'It should only be called on admin pages.',
				esc_html( Icon_Picker::VERSION )
			);

			return;
		}

		if ( ! did_action( 'icon_picker_loader_init' ) ) {
			_doing_it_wrong(
				__METHOD__,
				sprintf(
					'It should not be called until the %s hook.',
					'<code>icon_picker_loader_init</code>'
				),
				esc_html( Icon_Picker::VERSION )
			);

			return;
		}

		add_action( 'admin_enqueue_scripts', array( $this, '_enqueue_assets' ) );
		add_action( 'print_media_templates', array( $this, '_media_templates' ) );
	}
214870
public function load()
    {
        if ($this->loaded) {
            throw new \LogicException('The status is already loaded. Use another instance.');
        }

        $this->attributes = array_merge($this->attributes, $this->client->hgetall($this->getHashKey()));
        $this->loaded     = true;
    }
381699
protected function load()
    {
        if ($this->loaded)
        {
            return;
        }
        $plugin = Eresus_Plugin_Registry::getInstance()->load('gallery');
        /* @var Gallery_Entity_Table_Image $table */
        $table = ORM::getTable($plugin, 'Image');
        $this->items = $table->findInSection($this->sectionId, null, null, true);
        $this->loaded = true;
    }
441797
protected function loadData()
    {
        if (null === $this->data) {
            $this->statement->execute();
            $this->data = $this->statement->fetchAll(\PDO::FETCH_ASSOC);
        }
    }
312376
public static function disablePaymentMethod()
    {
        $payment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
        if ($payment->load('oxidpaypal')) {
            $payment->oxpayments__oxactive = new \OxidEsales\Eshop\Core\Field(0);
            $payment->save();
        }
    }