Ejemplo n.º 1
0
<?php

$objCreditCardPaymentCursor = CreditCardPayment::QueryCursor(QQ::Equal(QQN::CreditCardPayment()->CreditCardStatusTypeId, CreditCardStatusType::Authorized));
while ($objCreditCardPayment = CreditCardPayment::InstantiateCursor($objCreditCardPaymentCursor)) {
    $objCreditCardPayment->CaptureAuthorization();
}
 /**
  * Create and setup QListBox lstCreditCardPayment
  * @param string $strControlId optional ControlId to use
  * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself
  * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query
  * @return QListBox
  */
 public function lstCreditCardPayment_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null)
 {
     $this->lstCreditCardPayment = new QListBox($this->objParentObject, $strControlId);
     $this->lstCreditCardPayment->Name = QApplication::Translate('Credit Card Payment');
     $this->lstCreditCardPayment->AddItem(QApplication::Translate('- Select One -'), null);
     // Setup and perform the Query
     if (is_null($objCondition)) {
         $objCondition = QQ::All();
     }
     $objCreditCardPaymentCursor = CreditCardPayment::QueryCursor($objCondition, $objOptionalClauses);
     // Iterate through the Cursor
     while ($objCreditCardPayment = CreditCardPayment::InstantiateCursor($objCreditCardPaymentCursor)) {
         $objListItem = new QListItem($objCreditCardPayment->__toString(), $objCreditCardPayment->Id);
         if ($this->objOnlineDonation->CreditCardPayment && $this->objOnlineDonation->CreditCardPayment->Id == $objCreditCardPayment->Id) {
             $objListItem->Selected = true;
         }
         $this->lstCreditCardPayment->AddItem($objListItem);
     }
     // Return the QListBox
     return $this->lstCreditCardPayment;
 }