classname
stringlengths 2
79
⌀ | method_name
stringlengths 3
5.05k
| description
stringlengths 6
3.95k
| method_code
stringlengths 7
8.51k
⌀ | explanation
stringclasses 1
value |
---|---|---|---|---|
TPkgShopPaymentIPNException_RequestError | getResponseHeader | * the header to return to the caller.
*
* @return string | return 'HTTP/1.0 403.10 Invalid configuration'; | - |
TPkgShopPaymentIPNException_RequestError | getRequest | * @return TPkgShopPaymentIPNRequest|null | return $this->request; | - |
TPkgShopPaymentIPNException_SystemError | getResponseHeader | * the header to return to the caller.
*
* @return string | return 'HTTP/1.0 500 Internal Server Error '.$this->getErrorType(); | - |
TPkgShopPaymentIPNManager | getIPNURL | * @param TdbCmsPortal $portal
* @param TdbShopOrder $order
*
* @throws TPkgShopPaymentIPNException_OrderHasNoPaymentGroup
*
* @return string | $identifier = $this->getIPNIdentifierFromOrder($order);
if (null === $identifier) {
throw new TPkgShopPaymentIPNException_OrderHasNoPaymentGroup($order->id, 'failed to generate an IPN URL because the payment handler of the order is not assigned to any payment handler group'); | - |
TPkgShopPaymentIPNRequest | __construct | * @var string | $this->requestURL = $sURL;
$this->requestPayload = $aRequestPayload; | - |
TPkgShopPaymentIPNRequest | isIPNRequest | * @var array | return false !== stripos($this->getRequestURL(), self::URL_IPN_IDENTIFIER); | - |
TPkgShopPaymentIPNRequest | getIpnStatus | * @var TdbShopPaymentHandlerGroup|null | if (null === $this->oStatus) {
$this->oStatus = $this->getPaymentHandlerGroup()->getIPNStatus($this); | - |
TPkgShopPaymentIPNRequest | parseRequest | * @var TdbShopOrder|null | if (false === $this->isIPNRequest()) {
throw new TPkgShopPaymentIPNException_RequestError($this, "handleIPN called with an invalid URL (URL: {$this->getRequestURL(
) | - |
TPkgShopPaymentIPNRequest | allowRequestFromIP | * @var TdbShopPaymentHandler|IPkgShopPaymentIPNHandler | return $this->getPaymentHandlerGroup()->isValidIP($sRequestIP); | - |
TPkgShopPaymentIPNRequest | getRequestURL | * @var TdbPkgShopPaymentIpnStatus | return $this->requestURL; | - |
TPkgShopPaymentIPNRequest | getRequestPayload | * @param string $sURL
* @param array $aRequestPayload | return $this->requestPayload; | - |
TPkgShopPaymentIPNRequest | getPaymentHandlerGroup | * @param array<string, mixed> $aRequestPayload
* @param null|string $sSourceCharset
*
* @return array<string, mixed> | return $this->paymentHandlerGroup; | - |
TPkgShopPaymentIPNRequest | getOrder | * @return bool | return $this->order; | - |
TPkgShopPaymentIPNRequest | getPaymentHandler | * @return TdbPkgShopPaymentIpnStatus|null | return $this->paymentHandler; | - |
TPkgShopPaymentIpnMessage | replayIPN | * @return true|string - response string if exists, `true` otherwise | $oRequest = new TPkgShopPaymentIPNRequest($this->fieldRequestUrl, $this->fieldPayload);
$currentRequest = $this->getCurrentRequest();
$aData = array(
'datecreated' => date('Y-m-d H:i:s'),
'payload' => $this->fieldPayload,
'success' => '0',
'completed' => '0',
'ip' => null === $currentRequest ? '' : $currentRequest->getClientIp(),
'request_url' => $this->fieldRequestUrl,
'cms_portal_id' => $this->fieldCmsPortalId,
'shop_order_id',
);
$oMessage = TdbPkgShopPaymentIpnMessage::GetNewInstance($aData);
$oMessage->Save();
try {
$oRequest->parseRequest($oMessage);
$oStatus = $oRequest->getIpnStatus();
if (null === $oStatus) {
throw new TPkgShopPaymentIPNException_InvalidStatus($oRequest, 'IPN Request has no status or the status passed is not understood by the payment handler'); | - |
TPkgShopPaymentIpnTrigger | runTrigger | * @param TdbPkgShopPaymentIpnMessageTrigger $oMessageTrigger
*
* @return void | $oIpnMessage = $oMessageTrigger->GetFieldPkgShopPaymentIpnMessage();
$sURL = $this->fieldTargetUrl;
$aPayload = $oIpnMessage->fieldPayload;
$oToHost = new TPkgCmsCoreSendToHost($sURL);
$oToHost
->setPayload($aPayload)
->setMethod(TPkgCmsCoreSendToHost::METHOD_POST);
try {
$oToHost->executeRequest();
if (200 !== $oToHost->getLastResponseCode()) {
throw new TPkgCmsException(
'IPN invalid response header code ['.$oToHost->getLastResponseCode().'] (expected 200)'
); | - |
TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup | isValidIP | * return true if the ip may send IPN to this payment type.
*
* @param string $sIP
*
* @return bool | $bAllowed = false;
$sIPSource = trim($this->fieldIpnAllowedIps);
if ('' === $sIPSource) {
return true; | - |
TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup | handleIPN | * process the IPN request - the request object contains all details (payment handler, group, order etc)
* the call should return true if processing should continue, false if it is to stop. On Error it should throw an error
* extending AbstractPkgShopPaymentIPNHandlerException.
*
* @param TPkgShopPaymentIPNRequest $oRequest
*
* @trows AbstractPkgShopPaymentIPNHandlerException
*
* @return void | $aHandlerChain = $this->getIPNHandlerChain();
$this->handleIPNHook($oRequest);
foreach ($aHandlerChain as $sHandler) {
try {
/** @var $oHandler IPkgShopPaymentIPNHandler */
$oHandler = new $sHandler();
if (false === $oHandler->handleIPN($oRequest)) {
$this->handleTransactionHook($oHandler, $oRequest);
break; | - |
TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup | validateIPNRequestData | @var $oHandler IPkgShopPaymentIPNHandler | return true; | - |
TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup | getOrderFromRequestData | * extend this method if you want to do things for incoming ipn.
*
* @param TPkgShopPaymentIPNRequest $oRequest
*
* @return void | return null; | - |
TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup | processRawRequestData | * trigger transaction for the order based on the IPN.
*
* @param IPkgShopPaymentIPNHandler $oHandler
* @param TPkgShopPaymentIPNRequest $oRequest
*
* @return void | return $aRequestData; | - |
TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup | getIPNStatus | * return an array with names of payment handler (classes that implement IPkgShopPaymentIPNHandler).
*
* @return array | return null; | - |
TPkgShopPaymentIPN_TCMSSmartURLHandler | GetPageDef | * @return Request|null | $oURLData = TCMSSmartURLData::GetActive();
$oGlobal = TGlobal::instance();
$aRawData = $oGlobal->GetRawUserData();
$oRequest = new TPkgShopPaymentIPNRequest($oURLData->sRelativeURL, $aRawData);
if (false === $oRequest->isIPNRequest()) {
return false; | - |
TPkgShopPaymentIPN_TCMSTableEditor_PkgShopPaymentIpnMessage | DefineInterface | * adds table-specific buttons to the editor (add them directly to $this->oMenuItems). | parent::DefineInterface();
$this->methodCallAllowed[] = 'ReplayIPN'; | - |
TPkgShopPaymentIPN_TCMSTableEditor_PkgShopPaymentIpnMessage | ReplayIPN | * @return void | /** @var TdbPkgShopPaymentIpnMessage $oMsg */
$oMsg = $this->oTable;
return $oMsg->replayIPN(); | - |
TPkgShopPaymentIPN_TShopOrder | hasIPNStatusCode | * returns true if the status code has been sent as an IPN for the order.
*
* @param string $sStatusCode
*
* @return bool | $oStatusCode = TdbPkgShopPaymentIpnMessage::getMessageForOrder($this, $sStatusCode);
$bHasStatusCode = (null !== $oStatusCode);
return $bHasStatusCode; | - |
is | __construct | * the class is used to transfer data from an IPN to a pkgShopPaymentTransaction
* Class TPkgShopPaymentIPN_TransactionDetails. | $this->amount = $amount;
$this->transactionType = $transactionType;
$this->context = $context;
$this->sequenceNumber = $sequenceNumber;
$this->transactionTimestamp = $iTransactionTimestamp;
$this->resultingBalance = $dBalance; | - |
is | getAmount | @var float | return $this->amount; | - |
is | getContext | * @var string
* @psalm-var TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_* | return $this->context; | - |
is | getTransactionType | @var string | return $this->transactionType; | - |
is | getSequenceNumber | @var string | return $this->sequenceNumber; | - |
is | getTransactionTimestamp | @var int | return $this->transactionTimestamp; | - |
is | getResultingBalance | @var float|null | return $this->resultingBalance; | - |
is | setResultingBalance | @var array<string, mixed> | $this->resultingBalance = $resultingBalance;
return $this; | - |
is | setAdditionalData | * @param float $amount
* @param string $transactionType - must be a valid type (one of TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_*)
* @param string $context - a string explaining what caused the transaction
* @param string $sequenceNumber
* @param int $iTransactionTimestamp
* @param float $dBalance - if the IPN sends you a balance (amount remaining after transaction) then you can pass it here
*
* @psalm-param TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_* $transactionType | $this->additionalData[$key] = $value; | - |
is | getAdditionalData | * @return float | if (true === isset($this->additionalData[$key])) {
return $this->additionalData[$key]; | - |
ChameleonSystemShopPaymentTransactionExtension | load | * {@inheritdoc}
*
* @return void | $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/'));
$loader->load('services.xml'); | - |
TPkgShopPaymentTransactionMapper_CollectionFormForOrder | GetRequirements | * A mapper has to specify its requirements by providing th passed MapperRequirements instance with the
* needed information and returning it.
*
* example:
*
* $oRequirements->NeedsSourceObject("foo",'stdClass','default-value');
* $oRequirements->NeedsSourceObject("bar");
* $oRequirements->NeedsMappedValue("baz");
*
* @param IMapperRequirementsRestricted $oRequirements | $oRequirements->NeedsSourceObject('order', 'TdbShopOrder');
$oRequirements->NeedsSourceObject('paymentType'); // must be one of TPkgShopPaymentTransactionData::TYPE_* | - |
TPkgShopPaymentTransactionMapper_CollectionFormForOrder | Accept(
IMapperVisitorRestricted $oVisitor,
$bCachingEnabled,
IMapperCacheTriggerRestricted $oCacheTriggerManager
) | * To map values from models to views the mapper has to implement iVisitable.
* The ViewRender will pass a prepared MapperVisitor instance to the mapper.
*
* The mapper has to fill the values it is responsible for in the visitor.
*
* example:
*
* $foo = $oVisitor->GetSourceObject("foomodel")->GetFoo();
* $oVisitor->SetMapperValue("foo", $foo);
*
*
* To be able to access the desired source object in the visitor, the mapper has
* to declare this requirement in its GetRequirements method (see IViewMapper)
*
* @param \IMapperVisitorRestricted $oVisitor
* @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger
* @param IMapperCacheTriggerRestricted $oCacheTriggerManager | /** @var TdbShopOrder $order */
$order = $oVisitor->GetSourceObject('order');
$sTransactionType = $oVisitor->GetSourceObject('paymentType');
$sHeadline = '';
switch ($sTransactionType) {
case TPkgShopPaymentTransactionData::TYPE_PAYMENT:
$sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.collection_form.headline_payment');
break;
case TPkgShopPaymentTransactionData::TYPE_CREDIT:
case TPkgShopPaymentTransactionData::TYPE_PAYMENT_REVERSAL:
$sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.collection_form.headline_refund');
break;
default:
$sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.error.invalid_transaction_type', array('%sTransactionType%' => $sTransactionType));
break; | - |
TPkgShopPaymentTransactionContextEndPoint | __construct | * @var string | $this->context = $sContext;
$this->extranetUser = TdbDataExtranetUser::GetInstance();
$request = $this->getCurrentRequest();
$this->ip = null === $request ? '' : $request->getClientIp(); | - |
TPkgShopPaymentTransactionContextEndPoint | getContext | * @var TdbDataExtranetUser | return $this->context; | - |
TPkgShopPaymentTransactionContextEndPoint | getExtranetUser | * @var string|null | return $this->extranetUser; | - |
TPkgShopPaymentTransactionContextEndPoint | getIp | * @param string $sContext | return $this->ip; | - |
TPkgShopPaymentTransactionDataEndPoint | __construct | * @var TdbShopOrder | $this->setOrder($oOrder)
->setType($type); | - |
TPkgShopPaymentTransactionDataEndPoint | setOrder | * @var float | $this->order = $order;
return $this; | - |
TPkgShopPaymentTransactionDataEndPoint | setConfirmed | * @var string - one of self::TYPE_* | $this->confirmed = $confirmed;
return $this; | - |
TPkgShopPaymentTransactionDataEndPoint | setConfirmedTimestamp | * @var TPkgShopPaymentTransactionContext | $this->confirmedTimestamp = $confirmedTimestamp;
return $this; | - |
TPkgShopPaymentTransactionDataEndPoint | setContext | * @var bool | $this->context = $context;
return $this; | - |
TPkgShopPaymentTransactionDataEndPoint | addItem | * @var int | $this->items[] = $item;
return $this; | - |
TPkgShopPaymentTransactionDataEndPoint | setSequenceNumber | * @var int | $this->sequenceNumber = $sequenceNumber;
return $this; | - |
TPkgShopPaymentTransactionDataEndPoint | setTotalValue | * @var array of TPkgShopPaymentTransactionItemData | $this->totalValue = $totalValue;
return $this; | - |
TPkgShopPaymentTransactionDataEndPoint | setType | * use $this->addRequirement to add the requirements of the container.
*
* @return | $this->type = $type;
return $this; | - |
TPkgShopPaymentTransactionDataEndPoint | getConfirmed | * @param TdbShopOrder $oOrder
* @param string $type - must be one of self::TYPE_* | return $this->confirmed; | - |
TPkgShopPaymentTransactionDataEndPoint | getConfirmedTimestamp | * @param \TdbShopOrder $order
*
* @return $this | return $this->confirmedTimestamp; | - |
TPkgShopPaymentTransactionDataEndPoint | getContext | * @param bool $confirmed
*
* @return $this | return $this->context; | - |
TPkgShopPaymentTransactionDataEndPoint | getItems | * @param int $confirmedTimestamp
*
* @return $this | return $this->items; | - |
TPkgShopPaymentTransactionDataEndPoint | getSequenceNumber | * @param \TPkgShopPaymentTransactionContext $context
*
* @return $this | return $this->sequenceNumber; | - |
TPkgShopPaymentTransactionDataEndPoint | getTotalValue | * @param TPkgShopPaymentTransactionItemData $item
*
* @return $this | return $this->totalValue; | - |
TPkgShopPaymentTransactionDataEndPoint | getType | * @param int $sequenceNumber
*
* @return $this | return $this->type; | - |
TPkgShopPaymentTransactionDataEndPoint | getOrder | * @param float $totalValue
*
* @return $this | return $this->order; | - |
TPkgShopPaymentTransactionDataEndPoint | getTotalValueForItemType | * @param string $type
*
* @return $this | $dTotal = 0;
reset($this->items);
/** @var TPkgShopPaymentTransactionItemData $oItem */
foreach ($this->items as $oItem) {
if ($sType !== $oItem->getType()) {
continue; | - |
TPkgShopPaymentTransactionItemDataEndPoint | setValue | * @var int | $this->value = $value;
return $this; | - |
TPkgShopPaymentTransactionItemDataEndPoint | setAmount | * @var float | $this->amount = $amount;
return $this; | - |
TPkgShopPaymentTransactionItemDataEndPoint | setOrderItemId | * @var string | $this->orderItemId = $orderItemId;
return $this; | - |
TPkgShopPaymentTransactionItemDataEndPoint | setType | * @var string | $this->type = $type;
return $this; | - |
TPkgShopPaymentTransactionItemDataEndPoint | getValue | * @var TdbShopOrderItem|null | return $this->value; | - |
TPkgShopPaymentTransactionItemDataEndPoint | getAmount | * @param float $value
*
* @return $this | return $this->amount; | - |
TPkgShopPaymentTransactionItemDataEndPoint | getOrderItemId | * @param int $amount
*
* @return $this | return $this->orderItemId; | - |
TPkgShopPaymentTransactionItemDataEndPoint | getOrderItem | * @param string $orderItemId
*
* @return $this | if (null === $this->orderItem && null !== $this->getOrderItemId()) {
$oOrderItem = TdbShopOrderItem::GetNewInstance();
if (false === $oOrderItem->Load($this->getOrderItemId())) {
$sMsg = "unable to load the shop_order_item [{$this->getOrderItemId() | - |
TPkgShopPaymentTransactionItemDataEndPoint | getType | * @param string $type - must be one of self::TYPE_*
*
* @return $this | return $this->type; | - |
TPkgShopPaymentTransactionManagerEndPoint | __construct | * @param TdbShopOrder $oOrder | $this->order = $oOrder; | - |
TPkgShopPaymentTransactionManagerEndPoint | addTransaction | * important: the transaction will go through no matter what - make sure you validate the amount using getMaxAllowedValueFor
* before calling this method.
*
* @param TPkgShopPaymentTransactionData $transactionData
*
* @return TdbPkgShopPaymentTransaction | $transactionData->checkRequirements();
$sTransactionType = $transactionData->getType();
$amount = $transactionData->getTotalValue();
$oContext = $transactionData->getContext();
$iSequenceNumber = $transactionData->getSequenceNumber();
$oTransactionType = $this->getTransactionTypeObject($sTransactionType);
if (null === $iSequenceNumber) {
$iSequenceNumber = $this->getNextTransactionSequenceNumber(); | - |
TPkgShopPaymentTransactionManagerEndPoint | deleteTransaction | @var SecurityHelperAccess $securityHelper | $transaction->AllowEditByAll(true);
$transaction->Delete(); | - |
TPkgShopPaymentTransactionManagerEndPoint | confirmTransactionById | @var TPkgShopPaymentTransactionItemData $oItem | $oTransaction = TdbPkgShopPaymentTransaction::GetNewInstance();
if (false === $oTransaction->Load($transactionId)) {
return null; | - |
TPkgShopPaymentTransactionManagerEndPoint | confirmTransaction | * @param TdbPkgShopPaymentTransaction $transaction
*
* @return void | $oTransaction = TdbPkgShopPaymentTransaction::GetNewInstance();
$loadData = array('shop_order_id' => $this->order->id, 'sequence_number' => $iSequenceNumber);
if (true === $oTransaction->LoadFromFields($loadData)) {
$oTransaction = $this->confirmTransactionObject($oTransaction, $iConfirmedDate); | - |
TPkgShopPaymentTransactionManagerEndPoint | confirmTransactionObject | * searches for a transaction with matching id number and confirms it. returns the transaction if found, null if not.
*
* @param string $transactionId
* @param int $iConfirmedDate
*
* @return TdbPkgShopPaymentTransaction|null | if (false === $transaction->fieldConfirmed) {
$transaction->AllowEditByAll(true);
$transaction->SaveFieldsFast(
array('confirmed' => '1', 'confirmed_date' => date('Y-m-d H:i:s', $iConfirmedDate))
);
$transaction->AllowEditByAll(false);
// mark order as paid/unpaid depending on the remaining balance
$this->updateOrderPaidStatusBasedOnCurrentBalance();
$this->updateRealUsedVoucherValueBasedOnTransactions($transaction); | - |
TPkgShopPaymentTransactionManagerEndPoint | getTransactionBalance | * searches for a transaction with matching sequence number and confirms it. returns the transaction if found, null if not.
*
* @param int $iSequenceNumber
* @param int $iConfirmedDate - unix timestamp
*
* @return \TdbPkgShopPaymentTransaction|null | $dTotal = 0.00;
$sRestriction = '';
if (false === $bIncludeUnconfirmedTransactions) {
$sRestriction .= " AND `pkg_shop_payment_transaction`.`confirmed` = '1'"; | - |
TPkgShopPaymentTransactionManagerEndPoint | getMaxAllowedValueFor | * confirm given transaction object.
*
* @param TdbPkgShopPaymentTransaction $transaction
* @param int $iConfirmedDate
*
* @return TdbPkgShopPaymentTransaction | $dMaxValue = 0;
switch ($sTransactionType) {
case self::TRANSACTION_TYPE_PAYMENT:
$currentTransactionBalance = $this->getTransactionBalance(true);
$dMaxValue = $this->order->fieldValueTotal - $currentTransactionBalance;
break;
case self::TRANSACTION_TYPE_PAYMENT_REVERSAL:
case self::TRANSACTION_TYPE_CREDIT:
$dMaxValue = $this->getTransactionBalance(true);
break;
default:
break; | - |
TPkgShopPaymentTransactionManagerEndPoint | hasTransactions | * @param string $sTransactionType
*
* @return TdbPkgShopPaymentTransactionType
*
* @throws TPkgShopPaymentTransactionException_InvalidTransactionType | $iNumberOfTransactions = 0;
$sTransactionTypeRestriction = '';
if (null !== $sTransactionType) {
$oTransactionType = $this->getTransactionTypeObject($sTransactionType);
$sTransactionId = MySqlLegacySupport::getInstance()->real_escape_string($oTransactionType->id);
$sTransactionTypeRestriction = " AND `pkg_shop_payment_transaction`.`pkg_shop_payment_transaction_type_id` = '{$sTransactionId | - |
TPkgShopPaymentTransactionManagerEndPoint | getBillableProducts | @var array<string, TdbPkgShopPaymentTransactionType> $aTypeCache | $aProductList = array();
$oOrderItemList = $this->order->GetFieldShopOrderItemList();
$oOrderItemList->GoToStart();
while ($oOrderItem = $oOrderItemList->Next()) {
$iBilled = $this->getProductAmountWithTransactionType(
$oOrderItem->id,
self::TRANSACTION_TYPE_PAYMENT,
$bIncludeUnconfirmedTransactions
);
$iRemaining = round($oOrderItem->fieldOrderAmount - $iBilled);
if ($iRemaining > 0) {
$aProductList[$oOrderItem->id] = $iRemaining; | - |
TPkgShopPaymentTransactionManagerEndPoint | getRefundableProducts | * changes the paid status of the order (if required) based on the current balance
* returns true if the state of the order was changed.
*
* @return bool | $aProductList = array();
$oOrderItemList = $this->order->GetFieldShopOrderItemList();
$oOrderItemList->GoToStart();
while ($oOrderItem = $oOrderItemList->Next()) {
$iBilled = $this->getProductAmountWithTransactionType(
$oOrderItem->id,
self::TRANSACTION_TYPE_PAYMENT,
false
);
$iRefunded = $this->getProductAmountWithTransactionType(
$oOrderItem->id,
self::TRANSACTION_TYPE_CREDIT,
$bIncludeUnconfirmedTransactions
);
$iRefunded += $this->getProductAmountWithTransactionType(
$oOrderItem->id,
self::TRANSACTION_TYPE_PAYMENT_REVERSAL,
$bIncludeUnconfirmedTransactions
);
$iRefundable = round($iBilled + $iRefunded);
if ($iRefundable > 0) {
$aProductList[$oOrderItem->id] = $iRefundable; | - |
TPkgShopPaymentTransactionManagerEndPoint | allProductsAreRefundable | * returns the balance of all transactions for an order (without the order value).
*
* @param bool $bIncludeUnconfirmedTransactions
*
* @return float | $bProductsHaveBeenRefunded = $this->hasTransactions(self::TRANSACTION_TYPE_PAYMENT_REVERSAL)
|| $this->hasTransactions(self::TRANSACTION_TYPE_CREDIT);
if (true === $bProductsHaveBeenRefunded) {
return false; | - |
TPkgShopPaymentTransactionManagerEndPoint | getProductAmountWithTransactionType(
$sOrderItemId,
$sTransactionTypeSystemName,
$bIncludeUnconfirmedTransactions = true
) | * returns the transaction sequence for the next transaction.
*
* @return int | $sTransactionTypeId = $this->getTransactionTypeObject($sTransactionTypeSystemName)->id;
$iTotal = 0;
$sOrderItemId = MySqlLegacySupport::getInstance()->real_escape_string($sOrderItemId);
$sTransactionTypeId = MySqlLegacySupport::getInstance()->real_escape_string($sTransactionTypeId);
$sOrderId = MySqlLegacySupport::getInstance()->real_escape_string($this->order->id);
$sIncompleteRestriction = '';
if (false === $bIncludeUnconfirmedTransactions) {
$sIncompleteRestriction = " AND `pkg_shop_payment_transaction`.`confirmed` = '1'"; | - |
TPkgShopPaymentTransactionManagerEndPoint | getTransactionPositionTotalForType(
$sTransactionPositionType,
$bIncludeUnconfirmedTransactions = true
) | * the max value is always an absolute value (ie positive).
*
* @param string $sTransactionType - must be one of self::TRANSACTION_TYPE_*
*
* @return float | $iTotal = 0;
$sOrderId = MySqlLegacySupport::getInstance()->real_escape_string($this->order->id);
$sIncompleteRestriction = '';
if (false === $bIncludeUnconfirmedTransactions) {
$sIncompleteRestriction = " AND `pkg_shop_payment_transaction`.`confirmed` = '1'"; | - |
TPkgShopPaymentTransactionManagerEndPoint | getTransactionDataFromOrder(
$sTransactionType = TPkgShopPaymentTransactionData::TYPE_PAYMENT,
$aProductAmountRestriction = null,
$bUseConfirmedTransactionsOnly = true
) | * returns true if there are transactions for the order (pending or not).
*
* @param null|string $sTransactionType - must be one of self::TRANSACTION_TYPE_*
* @psalm-param null|self::TRANSACTION_TYPE_* $sTransactionType
*
* @return bool | $dSignMultiplier = 1;
if (TPkgShopPaymentTransactionData::TYPE_PAYMENT === $sTransactionType) {
$aItemBaseToUse = $this->getBillableProducts($bUseConfirmedTransactionsOnly); | - |
TPkgShopPaymentTransaction_TCMSTableEditorShopOrder | DefineInterface | * @return void | parent::DefineInterface();
if (false === $this->allowTransactions()) {
return; | - |
TPkgShopPaymentTransaction_TCMSTableEditorShopOrder | paymentTransactionCollectAll | * @return void | if (false === $this->allowTransactions()) {
return; | - |
TPkgShopPaymentTransaction_TCMSTableEditorShopOrder | paymentTransactionRefundAll | @var TdbShopOrder $oOrder | if (false === $this->allowTransactions()) {
return; | - |
TPkgShopPaymentTransaction_TCMSTableEditorShopOrder | pkgShopPaymentTransaction_PartialDebit | @var PaymentHandlerWithTransactionSupportInterface|\TdbShopPaymentHandler $paymentHandler | if (false === $this->allowTransactions()) {
return; | - |
TPkgShopPaymentTransaction_TCMSTableEditorShopOrder | pkgShopPaymentTransaction_getPartialCollectForm | * @return void | $oViewRenderer = new ViewRenderer();
$oViewRenderer->AddMapper(new TPkgShopPaymentTransactionMapper_CollectionFormForOrder());
$oViewRenderer->AddSourceObject('order', $this->oTable);
$oViewRenderer->AddSourceObject('paymentType', TPkgShopPaymentTransactionData::TYPE_PAYMENT);
return $oViewRenderer->Render('pkgShopPaymentTransaction/collection-form.html.twig'); | - |
TPkgShopPaymentTransaction_TCMSTableEditorShopOrder | pkgShopPaymentTransaction_getPartialRefundForm | @var TdbShopOrder $oOrder | $oViewRenderer = new ViewRenderer();
$oViewRenderer->AddMapper(new TPkgShopPaymentTransactionMapper_CollectionFormForOrder());
$oViewRenderer->AddSourceObject('order', $this->oTable);
$oViewRenderer->AddSourceObject('paymentType', TPkgShopPaymentTransactionData::TYPE_CREDIT);
return $oViewRenderer->Render('pkgShopPaymentTransaction/collection-form.html.twig'); | - |
TPkgShopPaymentTransaction_TCMSTableEditorShopOrder | GetHtmlHeadIncludes | @var PaymentHandlerWithTransactionSupportInterface&\TdbShopPaymentHandler $paymentHandler | $aIncludes = parent::GetHtmlHeadIncludes();
$aIncludesFromPackage = $this->getViewRendererSnippetDirectory()->getResourcesForSnippetPackage(
'pkgShopPaymentTransaction'
);
$aIncludes = array_merge($aIncludes, $aIncludesFromPackage);
return $aIncludes; | - |
PaymentTransactionHelper | getProductsCaptureOnOrderCreation | * {@inheritdoc} | $orderItems = $order->GetFieldShopOrderItemList();
$orderItems->GoToStart();
$captureItems = array();
while ($orderedProduct = $orderItems->Next()) {
if (false === $isCaptureOnShipment || false === $this->allowProductCaptureOnShipment($orderedProduct)) {
$captureItems[$orderedProduct->id] = $orderedProduct->fieldOrderAmount; | - |
PaymentTransactionHelper | getProductsCaptureOnShipping | * {@inheritdoc} | if (false === $isCaptureOnShipment) {
return array(); | - |
PaymentTransactionHelper | allowProductCaptureOnShipment | * {@inheritdoc} | return false === $orderedProduct->isDownload(); | - |
TPkgShopPrimaryNavigationMapper_StandardNavi | GetRequirements | * A mapper has to specify its requirements by providing th passed MapperRequirements instance with the
* needed information and returning it.
*
* example:
*
* $oRequirements->NeedsSourceObject("foo",'stdClass','default-value');
* $oRequirements->NeedsSourceObject("bar");
* $oRequirements->NeedsMappedValue("baz");
*
* @param IMapperRequirementsRestricted $oRequirements | $oRequirements->NeedsSourceObject('oPortal', 'TdbCmsPortal'); | - |
TPkgShopPrimaryNavigationMapper_StandardNavi | Accept | * To map values from models to views the mapper has to implement iVisitable.
* The ViewRender will pass a prepared MapeprVisitor instance to the mapper.
*
* The mapper has to fill the values it is responsible for in the visitor.
*
* example:
*
* $foo = $oVisitor->GetSourceObject("foomodel")->GetFoo();
* $oVisitor->SetMapperValue("foo", $foo);
*
*
* To be able to access the desired source object in the visitor, the mapper has
* to declare this requirement in its GetRequirements method (see IViewMapper)
*
* @param \IMapperVisitorRestricted $oVisitor
* @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger
* @param IMapperCacheTriggerRestricted $oCacheTriggerManager
*
* @return | /** @var $oPortal TdbCmsPortal */
$oPortal = $oVisitor->GetSourceObject('oPortal');
$oNodeList = TdbPkgShopPrimaryNaviList::GetListForCmsPortalId($oPortal->id);
$aTree = array();
while ($oNode = $oNodeList->Next()) {
$aTree[] = $oNode->getPkgCmsNavigationNodeObject(); | - |
TPkgShopPrimaryNavi | getPkgCmsNavigationNodeObject | * @return AbstractPkgCmsNavigationNode|null | $oNaviNode = null;
if (true === empty($this->fieldTarget)) {
return $oNaviNode; | - |
TPkgShopPrimaryNavigation_TPkgCmsNavigationNodeWithRootShopCategoriesAsChildren | getAChildren | * @return AbstractPkgCmsNavigationNode[]|null | if (true === $this->bDisableSubmenu) {
return null; | - |
TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category | load | * @extends AbstractPkgCmsNavigationNode<TdbShopCategory> | $category = TdbShopCategory::GetNewInstance($sId);
if (false === $category->AllowDisplayInShop() || false == $category->fieldActive) {
return false; | - |