The method to generate a default Billing which is Postpaid.

@return The Billing object with Postpaid PaymentTiming.
508424
private Billing generateDefaultBilling() {
        Billing billing = new Billing();
        billing.setPaymentTiming("Postpaid");
        billing.setBillingMethod("ByBandwidth");
        return billing;
    }
682414
public function getPartialPayments()
    {
        if (!$this->isInDB()) {
            return null;
        }

        return Payment::get()
            ->filter('InitialPaymentID', $this->ID)
            ->sort(array('Created' => 'DESC', 'ID' => 'DESC'));
    }
1212386
@Override
    public Class<? extends MonetaryAmount> getDefaultAmountType() {
        if (Objects.isNull(configuredDefaultAmountType)) {
            for (MonetaryAmountFactoryProviderSpi<?> f : Bootstrap.getServices(MonetaryAmountFactoryProviderSpi.class)) {
                if (f.getQueryInclusionPolicy() == MonetaryAmountFactoryProviderSpi.QueryInclusionPolicy.ALWAYS) {
                    configuredDefaultAmountType = f.getAmountType();
                    break;
                }
            }
        }
        return Optional.ofNullable(configuredDefaultAmountType)
                .orElseThrow(() -> new MonetaryException("No MonetaryAmountFactoryProviderSpi registered."));
    }
889115
public function loadPaymorrowDefault()
    {
        /** @var OxpsPaymorrowOxPayment|oxPayment $this */

        $query = sprintf(
            "SELECT * FROM `%s`WHERE %s AND `OXCHECKED` = 1 ORDER BY `OXSORT` ASC, `OXTIMESTAMP` DESC LIMIT 1",
            $this->getViewName(),
            $this->getPaymorrowMethodWhereClause()
        );

        return $this->assignRecord($query);
    }
940537
public Object getDefault()
    {
        Object objDefault = super.getDefault();
        if (objDefault == null)
            objDefault = INCLUDE_CLASS_PACKAGE;
        return objDefault;
    }
1119303
public static PaytrailService createPaytrailService() {
		IOHandler ioHandler = new HttpClientIOHandler();
		Marshaller marshaller = new JacksonMarshaller();
    String merchantId = SystemUtils.getSettingValue("paytrail.merchantId");
    String merchantSecret = SystemUtils.getSettingValue("paytrail.merchantSecret");
		return new PaytrailService(ioHandler, marshaller, merchantId, merchantSecret);
	}
543381
protected final PrcPaymentFromSave<RS> createPutPrcPaymentFromSave(
      final Map<String, Object> pAddParam) throws Exception {
    PrcPaymentFromSave<RS> proc = new PrcPaymentFromSave<RS>();
    proc.setSrvAccSettings(getSrvAccSettings());
    proc.setSrvAccEntry(getSrvAccEntry());
    proc.setSrvOrm(getSrvOrm());
    proc.setSrvI18n(getSrvI18n());
    proc.setPrcSalesInvoiceSave(lazyGetPrcSalesInvoiceSave(pAddParam));
    //assigning fully initialized object:
    this.processorsMap.put(PrcPaymentFromSave.class.getSimpleName(), proc);
    return proc;
  }
776705
public function getPayPalRequest()
    {
        if ($this->payPalRequest === null) {
            $this->payPalRequest = oxNew(\OxidEsales\PayPalModule\Core\Request::class);
        }

        return $this->payPalRequest;
    }
848848
public function default_payment_method()
  {
      if (!isset($this->id)) {
          return false;
      }
      if (!isset($this->default_payment_method_id)) {
          return false;
      }
      if (!$this->default_payment_method_id) {
          return false;
      }

      return Iugu_PaymentMethod::fetch(
      [
        'customer_id' => $this->id,
        'id'          => $this->default_payment_method_id,
      ]
    );
  }
1027036
@Override
	public double getPaymentOffset(double fixingTime) {
		if(getPaymentOffsetCode() == null) {
			return paymentOffset;
		}

		if(paymentOffsets.containsKey(fixingTime)) {
			return paymentOffsets.get(fixingTime);
		}
		else {
			/**
			 *  @TODO In case paymentDate is relevant for the index modeling, it should be checked
			 *  if the following derivation of paymentDate is accurate (e.g. wo we have a fixingOffset).
			 *  In such a case, this method may be overridden.
			 */
			LocalDate referenceDate = getReferenceDate();
			LocalDate fixingDate = FloatingpointDate.getDateFromFloatingPointDate(referenceDate, fixingTime);
			LocalDate paymentDate = getPaymentBusinessdayCalendar().getAdjustedDate(fixingDate, getPaymentOffsetCode(), getPaymentDateRollConvention());
			double paymentTime = FloatingpointDate.getFloatingPointDateFromDate(referenceDate, paymentDate);
			paymentOffsets.put(fixingTime, paymentTime-fixingTime);
			return paymentTime-fixingTime;
		}
	}
1137676
public function getCheckedPaymentId()
    {
        if ($this->_sCheckedPaymentId === null) {
            if (!($sPaymentID = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('paymentid'))) {
                $sPaymentID = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('paymentid');
            }
            if ($sPaymentID) {
                $sCheckedId = $sPaymentID;
            } elseif (($sSelectedPaymentID = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('_selected_paymentid'))) {
                $sCheckedId = $sSelectedPaymentID;
            } else {
                // #1010A.
                if ($oUser = $this->getUser()) {
                    $oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
                    if (($sLastPaymentId = $oOrder->getLastUserPaymentType($oUser->getId()))) {
                        $sCheckedId = $sLastPaymentId;
                    }
                }
            }

            // #M253 set to selected payment in db
            if (!$sCheckedId && $this->_sCheckedId) {
                $sCheckedId = $this->_sCheckedId;
            }

            // #646
            $oPaymentList = $this->getPaymentList();
            if (isset($oPaymentList) && $oPaymentList && !isset($oPaymentList[$sCheckedId])) {
                end($oPaymentList);
                $sCheckedId = key($oPaymentList);
            }
            $this->_sCheckedPaymentId = $sCheckedId;
        }

        return $this->_sCheckedPaymentId;
    }
649428
@Override
    public synchronized Coin getFeePaid() {
        stateMachine.checkState(State.CLOSED, State.CLOSING);
        return feePaidForPayment;
    }
467496
protected final String getForCreate(final Class<?> pClass) {
    if (pClass == Account.class
      || pClass == PaymentFrom.class || pClass == PaymentTo.class
        || pClass == PrepaymentFrom.class || pClass == PrepaymentTo.class
          || pClass == AdditionCostLine.class) {
      return PrcAccEntityWithSubaccCreate.class.getSimpleName();
    } else if (IInvoiceLine.class.isAssignableFrom(pClass)) {
      return PrcInvoiceLnCreate.class.getSimpleName();
    } else if (pClass == PurchaseReturnLine.class) {
      return PrcPurchaseReturnLineCreate.class.getSimpleName();
    } else if (pClass == SalesReturnLine.class) {
      return PrcSalRetLnCreate.class.getSimpleName();
    } else if (pClass == SubaccountLine.class) {
      return PrcSubaccountLineCreate.class.getSimpleName();
    } else if (pClass == AccountingEntry.class) {
      return PrcAccEntryCreate.class.getSimpleName();
    } else if (pClass == MatchForeignLine.class) {
      return PrcMatchForeignLineCreate.class.getSimpleName();
    } else if (pClass == CsvColumn.class) {
      return PrcCsvColumnCreate.class.getSimpleName();
    } else {
      if (this.hldAddEntitiesProcessorNames != null) {
        String name = this.hldAddEntitiesProcessorNames
          .getForCreate(pClass);
        if (name != null) {
          return name;
        }
      }
      return PrcEntityCreate.class.getSimpleName();
    }
  }
683132
public function getPayPalRequest()
    {
        if (is_null($this->payPalRequest)) {
            $requestBuilder = $this->getPayPalRequestBuilder();

            $data = $this->getData();

            $requestBuilder->setAuthorizationId($data->getAuthorizationId());
            $requestBuilder->setAmount($data->getAmount(), $data->getCurrency());

            $this->payPalRequest = $requestBuilder->getRequest();
        }

        return $this->payPalRequest;
    }
68049
public SolrTransactionSynchronizationAdapter withDefaultBehaviour() {

		this.adapter.registerCompletionDelegate(TransactionSynchronization.STATUS_COMMITTED,
				new SolrTransactionSynchronizationAdapter.CommitTransaction(this.collectionName));
		this.adapter.registerCompletionDelegate(TransactionSynchronization.STATUS_ROLLED_BACK,
				new SolrTransactionSynchronizationAdapter.RollbackTransaction(this.collectionName));

		return this.adapter;
	}
937913
public function getPayPalService()
    {
        if ($this->payPalService === null) {
            $this->payPalService = oxNew(\OxidEsales\PayPalModule\Core\PayPalService::class);
        }

        return $this->payPalService;
    }
1194260
protected function userPayment()
    {
        $ReturningParams = Input::get('ReturningParams');
        $ReturningParams = $this->decrypt($ReturningParams);

        $paramsArray = explode(",", $ReturningParams);
        $Amount = $paramsArray[0];
        $SaleOrderId = $paramsArray[1];
        $RefId = $paramsArray[2];
        $ResCode = $paramsArray[3];
        $ResMessage = $paramsArray[4];
        $PayGateTranID = $paramsArray[5];
        $RRN = $paramsArray[6];
        $LastFourDigitOfPAN = $paramsArray[7];


        $this->trackingCode = $PayGateTranID;
        $this->cardNumber = $LastFourDigitOfPAN;
        $this->refId = $RefId;


        if ($ResCode == '0' || $ResCode == '00') {
            return true;
        }

        $this->transactionFailed();
        $this->newLog($ResCode, $ResMessage . " - " . AsanpardakhtException::getMessageByCode($ResCode));
        throw new AsanpardakhtException($ResCode);
    }