Example #1
0
 private function buildCreditCardValidator(CreditCardPayment $ccHandler = null)
 {
     $validator = $this->getValidator("creditCard", $this->request);
     $validator->addCheck('ccName', new IsNotEmptyCheck($this->translate('_err_enter_cc_name')));
     $validator->addCheck('ccNum', new IsNotEmptyCheck($this->translate('_err_enter_cc_num')));
     $validator->addCheck('ccExpiryMonth', new IsNotEmptyCheck($this->translate('_err_select_cc_expiry_month')));
     $validator->addCheck('ccExpiryYear', new IsNotEmptyCheck($this->translate('_err_select_cc_expiry_year')));
     if ($ccHandler) {
         if ($ccHandler->isCardTypeNeeded()) {
             $validator->addCheck('ccType', new IsNotEmptyCheck($this->translate('_err_select_cc_type')));
         }
         if ($this->config->get('REQUIRE_CVV') && $ccHandler->isCvvRequired()) {
             $validator->addCheck('ccCVV', new IsNotEmptyCheck($this->translate('_err_enter_cc_cvv')));
         }
     }
     $validator->addFilter('ccCVV', new RegexFilter('[^0-9]'));
     $validator->addFilter('ccNum', new RegexFilter('[^ 0-9]'));
     $eavManager = new EavSpecificationManager(EavObject::getInstanceByIdentifier('creditcard'));
     $eavManager->setValidation($validator);
     return $validator;
 }
Example #2
0
<?php

$objCreditCardPaymentCursor = CreditCardPayment::QueryCursor(QQ::Equal(QQN::CreditCardPayment()->CreditCardStatusTypeId, CreditCardStatusType::Authorized));
while ($objCreditCardPayment = CreditCardPayment::InstantiateCursor($objCreditCardPaymentCursor)) {
    $objCreditCardPayment->CaptureAuthorization();
}
 public function toArray()
 {
     $ret = parent::toArray();
     $ret['name'] = 'Offline';
     return $ret;
 }
Example #4
0
 public static function GetSoapArrayFromArray($objArray)
 {
     if (!$objArray) {
         return null;
     }
     $objArrayToReturn = array();
     foreach ($objArray as $objObject) {
         array_push($objArrayToReturn, CreditCardPayment::GetSoapObjectFromObject($objObject, true));
     }
     return unserialize(serialize($objArrayToReturn));
 }
Example #5
0
File: batch.php Project: alcf/chms
 protected function Transactions_Refresh()
 {
     // Cache the Payment Array for actual trackable payments
     $this->objPaymentArray = CreditCardPayment::LoadArrayByPaypalBatchIdUnlinkedFlag($this->objBatch->Id, false, QQ::OrderBy(QQN::CreditCardPayment()->DateCaptured));
     if ($this->objBatch->ReconciledFlag) {
         $this->lblInstructionHtml->Text = sprintf('This PayPal Batch was posted to NOAH on <strong>%s</strong>.<br/><strong>No more changes can be made to this PayPal Batch.</strong><br/><br/>' . 'Click the following to view the linked <strong><a href="/stewardship/batch.php/%s#1">Stewardship Batch</a></strong>.<br/>' . 'Click on any <strong>Date Captured</strong> below on a credit card transaction with a donation record to view its linked Stewardship Entry.', $this->objBatch->DateReconciled->ToString('MMMM D YYYY at h:mm z'), $this->objBatch->StewardshipBatchId);
         $this->btnPost->Visible = false;
         $this->btnSplit->Visible = false;
         $this->dtxDateCredited->Visible = false;
     } else {
         if ($this->objBatch->IsUncategorizedPaymentsExist()) {
             $this->lblInstructionHtml->Text = 'There are currently unspecified funding accounts for one more more credit card payment line item.  Please ensure all items are accounted for before posting to NOAH.';
             $this->btnPost->Visible = false;
             $this->btnSplit->Visible = false;
             $this->dtxDateCredited->Visible = false;
             if (CreditCardPayment::CountByPaypalBatchIdUnlinkedFlag($this->objBatch->Id, true)) {
                 $this->lblInstructionHtml->Text .= '<br/><br/><strong>WARNING!</strong>  There are unaccountable Credit Card Payment records in this batch!';
             }
         } else {
             $this->lblInstructionHtml->Text = 'This PayPal Batch has not yet been posted to NOAH.  Click on <strong>Post to NOAH</strong> when you are sure that there are no more changes or additions left for this batch.';
             $this->btnPost->Visible = true;
             $this->btnSplit->Visible = true;
             $this->dtxDateCredited->Visible = true;
             $this->btnPost->RemoveAllActions(QClickEvent::EventName);
             if (CreditCardPayment::CountByPaypalBatchIdUnlinkedFlag($this->objBatch->Id, true)) {
                 $this->lblInstructionHtml->Text .= '<br/><br/><strong>WARNING!</strong>  There are unaccountable Credit Card Payment records in this batch!';
                 $this->btnPost->AddAction(new QClickEvent(), new QConfirmAction('NOTE!  There are unaccountable Credit Card Payment records in this batch!  You are about to PERMANENTLY post this batch to NOAH.  No changes can be made after this point.  Are you SURE you want to proceed?'));
                 $this->btnPost->AddAction(new QClickEvent(), new QAjaxAction('btnPost_Click'));
             } else {
                 $this->btnPost->AddAction(new QClickEvent(), new QConfirmAction('You are about to PERMANENTLY post this batch to NOAH.  No changes can be made after this point.  Are you SURE you want to proceed?'));
                 $this->btnPost->AddAction(new QClickEvent(), new QAjaxAction('btnPost_Click'));
             }
         }
     }
     $this->dtgTransactions->Refresh();
     $this->dtgFunding->Refresh();
 }
 /**
  * Refresh this MetaControl with Data from the local OnlineDonation object.
  * @param boolean $blnReload reload OnlineDonation from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objOnlineDonation->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objOnlineDonation->Id;
         }
     }
     if ($this->lstPerson) {
         $this->lstPerson->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objPersonArray = Person::LoadAll();
         if ($objPersonArray) {
             foreach ($objPersonArray as $objPerson) {
                 $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id);
                 if ($this->objOnlineDonation->Person && $this->objOnlineDonation->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objOnlineDonation->Person ? $this->objOnlineDonation->Person->__toString() : null;
     }
     if ($this->txtConfirmationEmail) {
         $this->txtConfirmationEmail->Text = $this->objOnlineDonation->ConfirmationEmail;
     }
     if ($this->lblConfirmationEmail) {
         $this->lblConfirmationEmail->Text = $this->objOnlineDonation->ConfirmationEmail;
     }
     if ($this->txtAmount) {
         $this->txtAmount->Text = $this->objOnlineDonation->Amount;
     }
     if ($this->lblAmount) {
         $this->lblAmount->Text = $this->objOnlineDonation->Amount;
     }
     if ($this->lstCreditCardPayment) {
         $this->lstCreditCardPayment->RemoveAllItems();
         $this->lstCreditCardPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreditCardPaymentArray = CreditCardPayment::LoadAll();
         if ($objCreditCardPaymentArray) {
             foreach ($objCreditCardPaymentArray as $objCreditCardPayment) {
                 $objListItem = new QListItem($objCreditCardPayment->__toString(), $objCreditCardPayment->Id);
                 if ($this->objOnlineDonation->CreditCardPayment && $this->objOnlineDonation->CreditCardPayment->Id == $objCreditCardPayment->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreditCardPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreditCardPaymentId) {
         $this->lblCreditCardPaymentId->Text = $this->objOnlineDonation->CreditCardPayment ? $this->objOnlineDonation->CreditCardPayment->__toString() : null;
     }
     if ($this->chkIsRecurringFlag) {
         $this->chkIsRecurringFlag->Checked = $this->objOnlineDonation->IsRecurringFlag;
     }
     if ($this->lblIsRecurringFlag) {
         $this->lblIsRecurringFlag->Text = $this->objOnlineDonation->IsRecurringFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->txtStatus) {
         $this->txtStatus->Text = $this->objOnlineDonation->Status;
     }
     if ($this->lblStatus) {
         $this->lblStatus->Text = $this->objOnlineDonation->Status;
     }
     if ($this->lstRecurringPayment) {
         $this->lstRecurringPayment->RemoveAllItems();
         $this->lstRecurringPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objRecurringPaymentArray = RecurringPayments::LoadAll();
         if ($objRecurringPaymentArray) {
             foreach ($objRecurringPaymentArray as $objRecurringPayment) {
                 $objListItem = new QListItem($objRecurringPayment->__toString(), $objRecurringPayment->Id);
                 if ($this->objOnlineDonation->RecurringPayment && $this->objOnlineDonation->RecurringPayment->Id == $objRecurringPayment->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstRecurringPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblRecurringPaymentId) {
         $this->lblRecurringPaymentId->Text = $this->objOnlineDonation->RecurringPayment ? $this->objOnlineDonation->RecurringPayment->__toString() : null;
     }
 }
 print sprintf("today is: %s\n", date('Y-m-d', time()));
 $checkTime = strtotime($startDate);
 while ($checkTime < strtotime($objRecurringPayment->EndDate)) {
     if (date('Y-m-d', $checkTime) == date('Y-m-d', time())) {
         print "TODAYS THE DAY. MAKE A PAYMENT!\n";
         /**************/
         // Create the Payment Object
         $objPaymentObject = new OnlineDonation();
         $objAddressValidator = new AddressValidator($objCrypto->Decrypt($objRecurringPayment->Address1), $objCrypto->Decrypt($objRecurringPayment->Address2), $objCrypto->Decrypt($objRecurringPayment->City), $objRecurringPayment->State, $objCrypto->Decrypt($objRecurringPayment->Zip));
         $objAddressValidator->ValidateAddress();
         $objAddress = $objAddressValidator->CreateAddressRecord();
         $namearray = explode(' ', $objCrypto->Decrypt($objRecurringPayment->CardHolderName));
         $objPaymentObject->AttachPersonWithInformation($namearray[0], $namearray[1], $objAddress);
         $objPaymentObject->IsRecurringFlag = true;
         $objPaymentObject->RecurringPaymentId = $objRecurringPayment->Id;
         $mixReturn = CreditCardPayment::PerformAuthorization($objPaymentObject, null, $namearray[0], $namearray[1], $objAddress, $objRecurringPayment->Amount, $objCrypto->Decrypt($objRecurringPayment->AccountNumber), $objRecurringPayment->ExpirationDate, $objCrypto->Decrypt($objRecurringPayment->SecurityCode), $objRecurringPayment->CreditCardTypeId);
         // Success?
         if ($mixReturn instanceof CreditCardPayment) {
             print "Successful scheduling of payment.\n";
             $objPaymentObject->Status = true;
             $intDonationId = $objPaymentObject->Save();
             $strPaymentItems = '';
             $objDonationItems = RecurringDonationItems::LoadArrayByRecurringDonationId($objRecurringPayment->RecurringDonationAsRecurringPayment->Id);
             foreach ($objDonationItems as $objDonationItem) {
                 $objFund = StewardshipFund::LoadById($objDonationItem->StewardshipFundId);
                 $strPaymentItems .= sprintf("%s - \$%01.2f ,", $objFund->Name, $objDonationItem->Amount);
             }
             sendSuccessEmail($objPaymentObject->Person->Id, $objPaymentObject->Id, $objCrypto->Decrypt($objRecurringPayment->CardHolderName), $objCrypto->Decrypt($objRecurringPayment->AccountNumber), $objRecurringPayment->CreditCardTypeId, $strPaymentItems, $objRecurringPayment->Amount);
             // Failed!
         } else {
             // Report Message
 /**
  * Main utility method to aid with data binding.  It is used by the default BindAllRows() databinder but
  * could and should be used by any custom databind methods that would be used for instances of this
  * MetaDataGrid, by simply passing in a custom QQCondition and/or QQClause. 
  *
  * If a paginator is set on this DataBinder, it will use it.  If not, then no pagination will be used.
  * It will also perform any sorting (if applicable).
  *
  * @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 void
  */
 public function MetaDataBinder(QQCondition $objCondition = null, $objOptionalClauses = null)
 {
     // Setup input parameters to default values if none passed in
     if (!$objCondition) {
         $objCondition = QQ::All();
     }
     $objClauses = $objOptionalClauses ? $objOptionalClauses : array();
     // We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
     if ($this->Paginator) {
         $this->TotalItemCount = CreditCardPayment::QueryCount($objCondition, $objClauses);
     }
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->LimitClause) {
         array_push($objClauses, $objClause);
     }
     // Set the DataSource to be a Query result from CreditCardPayment, given the clauses above
     $this->DataSource = CreditCardPayment::QueryArray($objCondition, $objClauses);
 }
Example #9
0
 public function btnSubmit_Click($strFormId, $strControlId, $strParameter)
 {
     // Setup the Address Object
     $objAddress = new Address();
     $objAddress->Address1 = trim($this->txtAddress1->Text);
     $objAddress->Address2 = trim($this->txtAddress2->Text);
     $objAddress->City = trim($this->txtCity->Text);
     $objAddress->State = trim($this->lstState->SelectedValue);
     $objAddress->ZipCode = trim($this->txtZipCode->Text);
     // Calculate the Amount
     $fltAmountToCharge = $this->objForm->GetAmount();
     // Calculate the Expiration
     $strCcExpiration = sprintf('%02d%02d', $this->lstCcExpMonth->SelectedValue, substr($this->lstCcExpYear->SelectedValue, 2));
     // Get the Payment Object
     $objPaymentObject = $this->objForm->CreatePaymentObject();
     $mixReturn = CreditCardPayment::PerformAuthorization($objPaymentObject, array($this->objForm, 'PaymentObjectSaveChildren'), $this->txtFirstName->Text, $this->txtLastName->Text, $objAddress, $fltAmountToCharge, $this->txtCcNumber->Text, $strCcExpiration, $this->txtCcCsc->Text, $this->lstCcType->SelectedValue);
     // Success?
     if ($mixReturn instanceof CreditCardPayment) {
         $this->dlgDialogBox->HideDialogBox();
         $this->objForm->PaymentPanel_Success($objPaymentObject);
         // Failed!
     } else {
         // Report Message
         if (!$mixReturn) {
             $mixReturn = 'Cannot connect to payment gateway.';
         }
         $this->btnDialogBoxOkay->Visible = true;
         $this->lblDialogBoxMessage->Text = '<h4>Credit Card Processing Failed</h4>' . $mixReturn . '<br/><br/>';
         $this->objForm->PaymentPanel_Failed($objPaymentObject);
     }
 }
 public function toArray()
 {
     $ret = parent::toArray();
     $ret['name'] = 'Test';
     return $ret;
 }
Example #11
0
 /**
  * The following will synchronously perform an "Authorization" for an UNSAVED PaymentObject against
  * a given Name, Address, Cc Credentials and Amount.  If the authorization succeeds, a valid
  * CreditCardPayment object is returned.  Otherwise, an error message is presented in String form.
  * 
  * The actual "Capture" will be performed asynchronously by a separate cron-based CLI process.
  * 
  * @param mixed $objPaymentObject this should be either an OnlineDonation or a SignupPayment object
  * @param array $arrPaymentObjectSaveChildrenCallback a callback to a method that will perform any children-save to the PaymentObject sent in
  * @param string $strFirstName
  * @param string $strLastName
  * @param Address $objAddress does not have to be linked to an actual db row
  * @param float $fltAmount
  * @param string $strCcNumber
  * @param string $strCcExpiration four digits, MMYY format
  * @param string $strCcCsc
  * @param integer $intCreditCardTypeId
  * @return mixed a CreditCardPayment object if authorization successful, otherwise a string-based message on why it failed
  */
 public static function PerformAuthorization($objPaymentObject, $arrPaymentObjectSaveChildrenCallback, $strFirstName, $strLastName, Address $objAddress, $fltAmount, $strCcNumber, $strCcExpiration, $strCcCsc, $intCreditCardTypeId)
 {
     // Ensure a "Valid" PaymentObject
     if (!$objPaymentObject instanceof SignupPayment && !$objPaymentObject instanceof OnlineDonation) {
         throw new QCallerException('Supplied PaymentObject is not an instance of SignupPayment or OnlineDonation');
     }
     if ($objPaymentObject->Id) {
         throw new QCallerException('Supplied PaymentObject has already been saved');
     }
     if ($objPaymentObject->CreditCardPaymentId) {
         throw new QCallerException('Supplied PaymentObject already has a linked CCPayment object');
     }
     CreditCardPayment::GetDatabase()->TransactionBegin();
     try {
         // Save the PaymentObject itself
         $objPaymentObject->Save();
         // Make a call to save children (if applicable)
         call_user_func($arrPaymentObjectSaveChildrenCallback, $objPaymentObject);
         $strClassName = get_class($objPaymentObject);
         switch ($strClassName) {
             case 'SignupPayment':
                 $strComment1 = 'Signup Payment ' . $objPaymentObject->Id;
                 $strComment2 = 'SE' . $objPaymentObject->SignupEntry->Id . ' - ' . 'SF' . $objPaymentObject->SignupEntry->SignupFormId . ' - ' . 'P' . $objPaymentObject->SignupEntry->PersonId;
                 $strInvoiceNumber = 'SP' . $objPaymentObject->Id;
                 break;
             case 'OnlineDonation':
                 $strComment1 = 'Online Donation ' . $objPaymentObject->Id;
                 $strComment2 = 'P' . $objPaymentObject->PersonId;
                 $strInvoiceNumber = 'OD' . $objPaymentObject->Id;
                 break;
             default:
                 throw new Exception('Unsupported: ' . $strClassName);
         }
         $strNvpRequestArray = self::PaymentGatewayGenerateAuthorizationPayload($strFirstName, $strLastName, $objAddress, $fltAmount, $strCcNumber, $strCcExpiration, $strCcCsc, $strComment1, $strComment2, $strInvoiceNumber);
         $strNvpResponseArray = self::PaymentGatewaySubmitRequest($strNvpRequestArray);
         if (!is_array($strNvpResponseArray)) {
             CreditCardPayment::GetDatabase()->TransactionRollBack();
             return 'Could Not Connect to Payment Gateway';
         }
         // Analyze the ResponseArray
         if (!array_key_exists('RESULT', $strNvpResponseArray)) {
             CreditCardPayment::GetDatabase()->TransactionRollBack();
             return 'Missing Result Code from Payment Gateway';
         }
         if (!array_key_exists('RESPMSG', $strNvpResponseArray)) {
             CreditCardPayment::GetDatabase()->TransactionRollBack();
             return 'Missing Response from Payment Gateway';
         }
         if (!array_key_exists('PNREF', $strNvpResponseArray)) {
             CreditCardPayment::GetDatabase()->TransactionRollBack();
             return 'Missing Reference ID from Payment Gateway';
         }
         // Fill in the blanks
         if (!array_key_exists('CVV2MATCH', $strNvpResponseArray)) {
             $strNvpResponseArray['CVV2MATCH'] = '';
         }
         if (!array_key_exists('AVSADDR', $strNvpResponseArray)) {
             $strNvpResponseArray['AVSADDR'] = '?';
         }
         if (!array_key_exists('AVSZIP', $strNvpResponseArray)) {
             $strNvpResponseArray['AVSZIP'] = '?';
         }
         if (!array_key_exists('IAVS', $strNvpResponseArray)) {
             $strNvpResponseArray['IAVS'] = '?';
         }
         if (!array_key_exists('AUTHCODE', $strNvpResponseArray)) {
             $strNvpResponseArray['AUTHCODE'] = '';
         }
         // If Failure, cleanup and then report
         if ($strNvpResponseArray['RESULT'] != 0) {
             CreditCardPayment::GetDatabase()->TransactionRollBack();
             return sprintf('%s (%s)', $strNvpResponseArray['RESPMSG'], $strNvpResponseArray['RESULT']);
         }
         // If CVV2 Failed, then Report
         if ($strNvpResponseArray['CVV2MATCH'] == 'N') {
             CreditCardPayment::GetDatabase()->TransactionRollBack();
             $strNvpRequestArray = self::PaymentGatewayGenerateVoidPayload($strNvpResponseArray['PNREF']);
             $strNvpResponseArray = self::PaymentGatewaySubmitRequest($strNvpRequestArray);
             return 'The CVV2 code entered is invalid.  Please double check the 3-digit CVV2 code on the back of your card. (' . $strNvpResponseArray['RESULT'] . ')';
         }
         // If we are here, we had a successful authorization!
         $objCreditCardPayment = new CreditCardPayment();
         $objCreditCardPayment->CreditCardStatusTypeId = CreditCardStatusType::Authorized;
         $objCreditCardPayment->CreditCardLastFour = substr($strCcNumber, strlen($strCcNumber) - 4);
         $objCreditCardPayment->CreditCardTypeId = $intCreditCardTypeId;
         $objCreditCardPayment->TransactionCode = $strNvpResponseArray['PNREF'];
         $objCreditCardPayment->AuthorizationCode = $strNvpResponseArray['AUTHCODE'];
         $objCreditCardPayment->AddressMatchCode = $strNvpResponseArray['AVSADDR'] . $strNvpResponseArray['AVSZIP'] . $strNvpResponseArray['IAVS'];
         $objCreditCardPayment->DateAuthorized = QDateTime::Now();
         $objCreditCardPayment->AmountCharged = $fltAmount;
         $objCreditCardPayment->UnlinkedFlag = false;
         // Save, Commit and Return
         $objCreditCardPayment->Save();
         $objPaymentObject->CreditCardPayment = $objCreditCardPayment;
         $objPaymentObject->Save();
         CreditCardPayment::GetDatabase()->TransactionCommit();
     } catch (Exception $objExc) {
         CreditCardPayment::GetDatabase()->TransactionRollBack();
         throw $objExc;
     }
     $objPaymentObject->RefreshDetailsWithCreditCardPayment();
     return $objCreditCardPayment;
 }
Example #12
0
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objPerson) {
         $objObject->objPerson = Person::GetSoapObjectFromObject($objObject->objPerson, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intPersonId = null;
         }
     }
     if ($objObject->objCreditCardPayment) {
         $objObject->objCreditCardPayment = CreditCardPayment::GetSoapObjectFromObject($objObject->objCreditCardPayment, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intCreditCardPaymentId = null;
         }
     }
     if ($objObject->objRecurringPayment) {
         $objObject->objRecurringPayment = RecurringPayments::GetSoapObjectFromObject($objObject->objRecurringPayment, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intRecurringPaymentId = null;
         }
     }
     return $objObject;
 }
 /**
  * Static Helper Method to Create using PK arguments
  * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
  * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
  * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
  * edit, or if we are also allowed to create a new one, etc.
  * 
  * @param mixed $objParentObject QForm or QPanel which will be using this CreditCardPaymentMetaControl
  * @param integer $intId primary key value
  * @param QMetaControlCreateType $intCreateType rules governing CreditCardPayment object creation - defaults to CreateOrEdit
  * @return CreditCardPaymentMetaControl
  */
 public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     // Attempt to Load from PK Arguments
     if (strlen($intId)) {
         $objCreditCardPayment = CreditCardPayment::Load($intId);
         // CreditCardPayment was found -- return it!
         if ($objCreditCardPayment) {
             return new CreditCardPaymentMetaControl($objParentObject, $objCreditCardPayment);
         } else {
             if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
                 throw new QCallerException('Could not find a CreditCardPayment object with PK arguments: ' . $intId);
             }
         }
         // If EditOnly is specified, throw an exception
     } else {
         if ($intCreateType == QMetaControlCreateType::EditOnly) {
             throw new QCallerException('No PK arguments specified');
         }
     }
     // If we are here, then we need to create a new record
     return new CreditCardPaymentMetaControl($objParentObject, new CreditCardPayment());
 }
Example #14
0
    /**
     * Deletes all associated CreditCardPayments
     * @return void
     */
    public function DeleteAllCreditCardPayments()
    {
        if (is_null($this->intId)) {
            throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditCardPayment on this unsaved PaypalBatch.');
        }
        // Get the Database Object for this Class
        $objDatabase = PaypalBatch::GetDatabase();
        // Journaling
        if ($objDatabase->JournalingDatabase) {
            foreach (CreditCardPayment::LoadArrayByPaypalBatchId($this->intId) as $objCreditCardPayment) {
                $objCreditCardPayment->Journal('DELETE');
            }
        }
        // Perform the SQL Query
        $objDatabase->NonQuery('
				DELETE FROM
					`credit_card_payment`
				WHERE
					`paypal_batch_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
    }
 /**
  * This will save this object's StewardshipContribution instance,
  * updating only the fields which have had a control created for it.
  */
 public function SaveStewardshipContribution()
 {
     try {
         // Update any fields for controls that have been created
         if ($this->lstPerson) {
             $this->objStewardshipContribution->PersonId = $this->lstPerson->SelectedValue;
         }
         if ($this->lstStewardshipContributionType) {
             $this->objStewardshipContribution->StewardshipContributionTypeId = $this->lstStewardshipContributionType->SelectedValue;
         }
         if ($this->lstStewardshipBatch) {
             $this->objStewardshipContribution->StewardshipBatchId = $this->lstStewardshipBatch->SelectedValue;
         }
         if ($this->lstStewardshipStack) {
             $this->objStewardshipContribution->StewardshipStackId = $this->lstStewardshipStack->SelectedValue;
         }
         if ($this->lstCheckingAccountLookup) {
             $this->objStewardshipContribution->CheckingAccountLookupId = $this->lstCheckingAccountLookup->SelectedValue;
         }
         if ($this->txtTotalAmount) {
             $this->objStewardshipContribution->TotalAmount = $this->txtTotalAmount->Text;
         }
         if ($this->calDateEntered) {
             $this->objStewardshipContribution->DateEntered = $this->calDateEntered->DateTime;
         }
         if ($this->calDateCleared) {
             $this->objStewardshipContribution->DateCleared = $this->calDateCleared->DateTime;
         }
         if ($this->calDateCredited) {
             $this->objStewardshipContribution->DateCredited = $this->calDateCredited->DateTime;
         }
         if ($this->txtCheckNumber) {
             $this->objStewardshipContribution->CheckNumber = $this->txtCheckNumber->Text;
         }
         if ($this->txtAuthorizationNumber) {
             $this->objStewardshipContribution->AuthorizationNumber = $this->txtAuthorizationNumber->Text;
         }
         if ($this->txtAlternateSource) {
             $this->objStewardshipContribution->AlternateSource = $this->txtAlternateSource->Text;
         }
         if ($this->chkNonDeductibleFlag) {
             $this->objStewardshipContribution->NonDeductibleFlag = $this->chkNonDeductibleFlag->Checked;
         }
         if ($this->txtNote) {
             $this->objStewardshipContribution->Note = $this->txtNote->Text;
         }
         if ($this->lstCreatedByLogin) {
             $this->objStewardshipContribution->CreatedByLoginId = $this->lstCreatedByLogin->SelectedValue;
         }
         if ($this->chkUnpostedFlag) {
             $this->objStewardshipContribution->UnpostedFlag = $this->chkUnpostedFlag->Checked;
         }
         // Update any UniqueReverseReferences (if any) for controls that have been created for it
         if ($this->lstCreditCardPayment) {
             $this->objStewardshipContribution->CreditCardPayment = CreditCardPayment::Load($this->lstCreditCardPayment->SelectedValue);
         }
         // Save the StewardshipContribution object
         $this->objStewardshipContribution->Save();
         // Finally, update any ManyToManyReferences (if any)
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }
Example #16
0
 /**
  * This will process a report text file as taken from PayPal.  This will create any applicable PaypalBatch entries
  * and correlate with existing CreditCardPayment records.  This will *only* process "Delayed Capture" transactions,
  * since that's all we actually care about.  This will create "as unlinked" any CreditCardPayment records that had
  * to be created because it didn't exist (which means that this is a bad thing -- we should not have any of those).
  * 
  * If there are any issues with importing, this will throw an error
  * 
  * @param string $strReportText the text of the report itself from paypal
  * @param integer $intEntriesModified return value of the number of entries that were modified
  * @param integer $intEntriesAdded return value of the number of entries that were created (hopefully shouuld be zero)
  * @throws QCallerException
  */
 public static function ProcessReport($strReportText, &$intEntriesModified, &$intEntriesAdded)
 {
     $intEntriesModified = 0;
     $intEntriesAdded = 0;
     // Cleanup Linebreaks
     $strReportText = str_replace("\r", "\n", $strReportText);
     while (strpos($strReportText, "\n\n") !== false) {
         $strReportText = str_replace("\n\n", "\n", $strReportText);
     }
     $strReportText = trim($strReportText);
     // Pull out the First Line (column headers) from the rest of the report
     $intPosition = strpos($strReportText, "\n");
     $strFirstLine = substr($strReportText, 0, $intPosition);
     $strReportText = substr($strReportText, $intPosition + 1);
     // Calculate the tokens
     $strTokenArray = array();
     $intColumnIndex = 0;
     foreach (explode("\t", $strFirstLine) as $strToken) {
         if (array_key_exists($strToken, $strTokenArray)) {
             throw new QCallerException('Report has a duplicate column: ' . $strToken);
         }
         $strTokenArray[$strToken] = $intColumnIndex;
         $intColumnIndex++;
     }
     // Ensure that the required fields exist
     foreach (self::$RequiredFields as $strRequiredToken) {
         if (!array_key_exists($strRequiredToken, $strTokenArray)) {
             throw new QCallerException('Report is missing required column: ' . $strRequiredToken);
         }
     }
     // Go through each line of the report
     foreach (explode("\n", $strReportText) as $strLine) {
         // Break out all cells, and then create a specific Values array that contain only the cells we care about, indexed by name
         $strCellArray = explode("\t", $strLine);
         $strValuesArray = array();
         foreach (self::$RequiredFields as $strRequiredToken) {
             $strValuesArray[$strRequiredToken] = $strCellArray[$strTokenArray[$strRequiredToken]];
         }
         // Only process "Delayed Capture"
         if ($strValuesArray['Type'] == 'Delayed Capture') {
             if (strlen(trim($strValuesArray[self::PayPalOriginalTransactionId])) == 0) {
                 throw new QCallerException('Transaction ' . $strValuesArray[self::PayPalTransactionId] . ' does not have an Original Transaction Id');
             }
             // Can we find the linked CCPayment Record?
             $objCreditCardPayment = CreditCardPayment::LoadByTransactionCode($strValuesArray[self::PayPalOriginalTransactionId]);
             if (!$objCreditCardPayment) {
                 // No -- let's create this as an UNLINKED one
                 $intEntriesAdded++;
                 $objCreditCardPayment = new CreditCardPayment();
                 $objCreditCardPayment->TransactionCode = $strValuesArray[self::PayPalOriginalTransactionId];
                 $objCreditCardPayment->CreditCardStatusTypeId = CreditCardStatusType::Captured;
                 $objCreditCardPayment->CreditCardLastFour = substr($strValuesArray[self::PayPalAccountNumber], strlen($strValuesArray[self::PayPalAccountNumber]) - 4);
                 foreach (CreditCardType::$NameArray as $intId => $strName) {
                     if (strtolower($strName) == strtolower($strValuesArray[self::PayPalTenderType])) {
                         $objCreditCardPayment->CreditCardTypeId = $intId;
                     }
                 }
                 if (!$objCreditCardPayment->CreditCardTypeId) {
                     throw new QCallerException('Unlinked transaction contains an unknown credit card type: ' . $strValuesArray[self::PayPalTenderType]);
                 }
                 $objCreditCardPayment->UnlinkedFlag = true;
                 // Setup Fields
                 $objCreditCardPayment->AuthorizationCode = $strValuesArray[self::PayPalAuthCode];
                 $objCreditCardPayment->AmountCharged = $strValuesArray[self::PayPalAmount];
             }
             // Link in the Pay Pal Batch Info (if applicable)
             //					if (SERVER_INSTANCE == 'dev') $strValuesArray[self::PayPalBatchId] = 789;
             if ($intBatchNumber = trim($strValuesArray[self::PayPalBatchId])) {
                 $objPayPalBatch = PaypalBatch::LoadByNumber($intBatchNumber);
                 if (!$objPayPalBatch) {
                     $objPayPalBatch = new PaypalBatch();
                     $objPayPalBatch->Number = $intBatchNumber;
                     $objPayPalBatch->DateReceived = new QDateTime($strValuesArray[self::PayPalSettledDate]);
                     $objPayPalBatch->ReconciledFlag = false;
                     $objPayPalBatch->Save();
                 }
                 if ($objCreditCardPayment->PaypalBatchId != $objPayPalBatch->Id) {
                     $objCreditCardPayment->PaypalBatch = $objPayPalBatch;
                     if ($objCreditCardPayment->Id) {
                         $intEntriesModified++;
                     }
                 }
             } else {
                 if (!is_null($objCreditCardPayment->PaypalBatchId)) {
                     $objCreditCardPayment->PaypalBatch = null;
                     if ($objCreditCardPayment->Id) {
                         $intEntriesModified++;
                     }
                 }
             }
             // TODO: How do we account fo a "reconciled" PayPal batch that unexpectatly received another transaction not previously accounted for?
             // Check Fields to ensure match
             if ($objCreditCardPayment->AuthorizationCode != $strValuesArray[self::PayPalAuthCode]) {
                 throw new QCallerException(sprintf('Mismatch AuthCode for Transaction %s: %s vs. %s', $strValuesArray[self::PayPalOriginalTransactionId], $strValuesArray[self::PayPalAuthCode], $objCreditCardPayment->AuthorizationCode));
             }
             if ($objCreditCardPayment->AmountCharged != str_replace(',', '', $strValuesArray[self::PayPalAmount])) {
                 throw new QCallerException(sprintf('Mismatch Amount for Transaction %s: %s vs. %s', $strValuesArray[self::PayPalOriginalTransactionId], $strValuesArray[self::PayPalAmount], $objCreditCardPayment->AmountCharged));
             }
             // Update Fields
             $objCreditCardPayment->DateCaptured = new QDateTime($strValuesArray[self::PayPalTime]);
             $objCreditCardPayment->Save();
         }
     }
 }
 /**
  * Refresh this MetaControl with Data from the local SignupPayment object.
  * @param boolean $blnReload reload SignupPayment from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objSignupPayment->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objSignupPayment->Id;
         }
     }
     if ($this->lstSignupEntry) {
         $this->lstSignupEntry->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstSignupEntry->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objSignupEntryArray = SignupEntry::LoadAll();
         if ($objSignupEntryArray) {
             foreach ($objSignupEntryArray as $objSignupEntry) {
                 $objListItem = new QListItem($objSignupEntry->__toString(), $objSignupEntry->Id);
                 if ($this->objSignupPayment->SignupEntry && $this->objSignupPayment->SignupEntry->Id == $objSignupEntry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupEntry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupEntryId) {
         $this->lblSignupEntryId->Text = $this->objSignupPayment->SignupEntry ? $this->objSignupPayment->SignupEntry->__toString() : null;
     }
     if ($this->lstSignupPaymentType) {
         $this->lstSignupPaymentType->SelectedValue = $this->objSignupPayment->SignupPaymentTypeId;
     }
     if ($this->lblSignupPaymentTypeId) {
         $this->lblSignupPaymentTypeId->Text = $this->objSignupPayment->SignupPaymentTypeId ? SignupPaymentType::$NameArray[$this->objSignupPayment->SignupPaymentTypeId] : null;
     }
     if ($this->calTransactionDate) {
         $this->calTransactionDate->DateTime = $this->objSignupPayment->TransactionDate;
     }
     if ($this->lblTransactionDate) {
         $this->lblTransactionDate->Text = sprintf($this->objSignupPayment->TransactionDate) ? $this->objSignupPayment->__toString($this->strTransactionDateDateTimeFormat) : null;
     }
     if ($this->txtTransactionDescription) {
         $this->txtTransactionDescription->Text = $this->objSignupPayment->TransactionDescription;
     }
     if ($this->lblTransactionDescription) {
         $this->lblTransactionDescription->Text = $this->objSignupPayment->TransactionDescription;
     }
     if ($this->txtAmount) {
         $this->txtAmount->Text = $this->objSignupPayment->Amount;
     }
     if ($this->lblAmount) {
         $this->lblAmount->Text = $this->objSignupPayment->Amount;
     }
     if ($this->txtFundingAccount) {
         $this->txtFundingAccount->Text = $this->objSignupPayment->FundingAccount;
     }
     if ($this->lblFundingAccount) {
         $this->lblFundingAccount->Text = $this->objSignupPayment->FundingAccount;
     }
     if ($this->lstDonationStewardshipFund) {
         $this->lstDonationStewardshipFund->RemoveAllItems();
         $this->lstDonationStewardshipFund->AddItem(QApplication::Translate('- Select One -'), null);
         $objDonationStewardshipFundArray = StewardshipFund::LoadAll();
         if ($objDonationStewardshipFundArray) {
             foreach ($objDonationStewardshipFundArray as $objDonationStewardshipFund) {
                 $objListItem = new QListItem($objDonationStewardshipFund->__toString(), $objDonationStewardshipFund->Id);
                 if ($this->objSignupPayment->DonationStewardshipFund && $this->objSignupPayment->DonationStewardshipFund->Id == $objDonationStewardshipFund->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstDonationStewardshipFund->AddItem($objListItem);
             }
         }
     }
     if ($this->lblDonationStewardshipFundId) {
         $this->lblDonationStewardshipFundId->Text = $this->objSignupPayment->DonationStewardshipFund ? $this->objSignupPayment->DonationStewardshipFund->__toString() : null;
     }
     if ($this->txtAmountDonation) {
         $this->txtAmountDonation->Text = $this->objSignupPayment->AmountDonation;
     }
     if ($this->lblAmountDonation) {
         $this->lblAmountDonation->Text = $this->objSignupPayment->AmountDonation;
     }
     if ($this->txtAmountNonDonation) {
         $this->txtAmountNonDonation->Text = $this->objSignupPayment->AmountNonDonation;
     }
     if ($this->lblAmountNonDonation) {
         $this->lblAmountNonDonation->Text = $this->objSignupPayment->AmountNonDonation;
     }
     if ($this->lstCreditCardPayment) {
         $this->lstCreditCardPayment->RemoveAllItems();
         $this->lstCreditCardPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreditCardPaymentArray = CreditCardPayment::LoadAll();
         if ($objCreditCardPaymentArray) {
             foreach ($objCreditCardPaymentArray as $objCreditCardPayment) {
                 $objListItem = new QListItem($objCreditCardPayment->__toString(), $objCreditCardPayment->Id);
                 if ($this->objSignupPayment->CreditCardPayment && $this->objSignupPayment->CreditCardPayment->Id == $objCreditCardPayment->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreditCardPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreditCardPaymentId) {
         $this->lblCreditCardPaymentId->Text = $this->objSignupPayment->CreditCardPayment ? $this->objSignupPayment->CreditCardPayment->__toString() : null;
     }
 }
Example #18
0
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objSignupEntry) {
         $objObject->objSignupEntry = SignupEntry::GetSoapObjectFromObject($objObject->objSignupEntry, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intSignupEntryId = null;
         }
     }
     if ($objObject->dttTransactionDate) {
         $objObject->dttTransactionDate = $objObject->dttTransactionDate->__toString(QDateTime::FormatSoap);
     }
     if ($objObject->objDonationStewardshipFund) {
         $objObject->objDonationStewardshipFund = StewardshipFund::GetSoapObjectFromObject($objObject->objDonationStewardshipFund, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intDonationStewardshipFundId = null;
         }
     }
     if ($objObject->objCreditCardPayment) {
         $objObject->objCreditCardPayment = CreditCardPayment::GetSoapObjectFromObject($objObject->objCreditCardPayment, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intCreditCardPaymentId = null;
         }
     }
     return $objObject;
 }
 /**
  * Override method to perform a property "Get"
  * This will get the value of $strName
  *
  * @param string $strName Name of the property to get
  * @return mixed
  */
 public function __get($strName)
 {
     switch ($strName) {
         ///////////////////
         // Member Variables
         ///////////////////
         case 'Id':
             // Gets the value for intId (Read-Only PK)
             // @return integer
             return $this->intId;
         case 'PersonId':
             // Gets the value for intPersonId (Not Null)
             // @return integer
             return $this->intPersonId;
         case 'StewardshipContributionTypeId':
             // Gets the value for intStewardshipContributionTypeId (Not Null)
             // @return integer
             return $this->intStewardshipContributionTypeId;
         case 'StewardshipBatchId':
             // Gets the value for intStewardshipBatchId (Not Null)
             // @return integer
             return $this->intStewardshipBatchId;
         case 'StewardshipStackId':
             // Gets the value for intStewardshipStackId
             // @return integer
             return $this->intStewardshipStackId;
         case 'CheckingAccountLookupId':
             // Gets the value for intCheckingAccountLookupId
             // @return integer
             return $this->intCheckingAccountLookupId;
         case 'TotalAmount':
             // Gets the value for fltTotalAmount
             // @return double
             return $this->fltTotalAmount;
         case 'DateEntered':
             // Gets the value for dttDateEntered (Not Null)
             // @return QDateTime
             return $this->dttDateEntered;
         case 'DateCleared':
             // Gets the value for dttDateCleared
             // @return QDateTime
             return $this->dttDateCleared;
         case 'DateCredited':
             // Gets the value for dttDateCredited (Not Null)
             // @return QDateTime
             return $this->dttDateCredited;
         case 'CheckNumber':
             // Gets the value for strCheckNumber
             // @return string
             return $this->strCheckNumber;
         case 'AuthorizationNumber':
             // Gets the value for strAuthorizationNumber
             // @return string
             return $this->strAuthorizationNumber;
         case 'AlternateSource':
             // Gets the value for strAlternateSource
             // @return string
             return $this->strAlternateSource;
         case 'NonDeductibleFlag':
             // Gets the value for blnNonDeductibleFlag
             // @return boolean
             return $this->blnNonDeductibleFlag;
         case 'Note':
             // Gets the value for strNote
             // @return string
             return $this->strNote;
         case 'CreatedByLoginId':
             // Gets the value for intCreatedByLoginId (Not Null)
             // @return integer
             return $this->intCreatedByLoginId;
         case 'UnpostedFlag':
             // Gets the value for blnUnpostedFlag
             // @return boolean
             return $this->blnUnpostedFlag;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Person':
             // Gets the value for the Person object referenced by intPersonId (Not Null)
             // @return Person
             try {
                 if (!$this->objPerson && !is_null($this->intPersonId)) {
                     $this->objPerson = Person::Load($this->intPersonId);
                 }
                 return $this->objPerson;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'StewardshipBatch':
             // Gets the value for the StewardshipBatch object referenced by intStewardshipBatchId (Not Null)
             // @return StewardshipBatch
             try {
                 if (!$this->objStewardshipBatch && !is_null($this->intStewardshipBatchId)) {
                     $this->objStewardshipBatch = StewardshipBatch::Load($this->intStewardshipBatchId);
                 }
                 return $this->objStewardshipBatch;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'StewardshipStack':
             // Gets the value for the StewardshipStack object referenced by intStewardshipStackId
             // @return StewardshipStack
             try {
                 if (!$this->objStewardshipStack && !is_null($this->intStewardshipStackId)) {
                     $this->objStewardshipStack = StewardshipStack::Load($this->intStewardshipStackId);
                 }
                 return $this->objStewardshipStack;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CheckingAccountLookup':
             // Gets the value for the CheckingAccountLookup object referenced by intCheckingAccountLookupId
             // @return CheckingAccountLookup
             try {
                 if (!$this->objCheckingAccountLookup && !is_null($this->intCheckingAccountLookupId)) {
                     $this->objCheckingAccountLookup = CheckingAccountLookup::Load($this->intCheckingAccountLookupId);
                 }
                 return $this->objCheckingAccountLookup;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CreatedByLogin':
             // Gets the value for the Login object referenced by intCreatedByLoginId (Not Null)
             // @return Login
             try {
                 if (!$this->objCreatedByLogin && !is_null($this->intCreatedByLoginId)) {
                     $this->objCreatedByLogin = Login::Load($this->intCreatedByLoginId);
                 }
                 return $this->objCreatedByLogin;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CreditCardPayment':
             // Gets the value for the CreditCardPayment object that uniquely references this StewardshipContribution
             // by objCreditCardPayment (Unique)
             // @return CreditCardPayment
             try {
                 if ($this->objCreditCardPayment === false) {
                     // We've attempted early binding -- and the reverse reference object does not exist
                     return null;
                 }
                 if (!$this->objCreditCardPayment) {
                     $this->objCreditCardPayment = CreditCardPayment::LoadByStewardshipContributionId($this->intId);
                 }
                 return $this->objCreditCardPayment;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             ////////////////////////////
             // Virtual Object References (Many to Many and Reverse References)
             // (If restored via a "Many-to" expansion)
             ////////////////////////////
         ////////////////////////////
         // Virtual Object References (Many to Many and Reverse References)
         // (If restored via a "Many-to" expansion)
         ////////////////////////////
         case '_StewardshipContributionAmount':
             // Gets the value for the private _objStewardshipContributionAmount (Read-Only)
             // if set due to an expansion on the stewardship_contribution_amount.stewardship_contribution_id reverse relationship
             // @return StewardshipContributionAmount
             return $this->_objStewardshipContributionAmount;
         case '_StewardshipContributionAmountArray':
             // Gets the value for the private _objStewardshipContributionAmountArray (Read-Only)
             // if set due to an ExpandAsArray on the stewardship_contribution_amount.stewardship_contribution_id reverse relationship
             // @return StewardshipContributionAmount[]
             return (array) $this->_objStewardshipContributionAmountArray;
         case '_StewardshipPostLineItem':
             // Gets the value for the private _objStewardshipPostLineItem (Read-Only)
             // if set due to an expansion on the stewardship_post_line_item.stewardship_contribution_id reverse relationship
             // @return StewardshipPostLineItem
             return $this->_objStewardshipPostLineItem;
         case '_StewardshipPostLineItemArray':
             // Gets the value for the private _objStewardshipPostLineItemArray (Read-Only)
             // if set due to an ExpandAsArray on the stewardship_post_line_item.stewardship_contribution_id reverse relationship
             // @return StewardshipPostLineItem[]
             return (array) $this->_objStewardshipPostLineItemArray;
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }