*/
/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
- */
-
-/**
- * This class generates form components for processing a contribution
- *
+ * This class generates form components for processing a contribution.
*/
class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditPayment {
/**
public $userDisplayName;
/**
- * Set variables up before form is built
- *
- * @return void
+ * Set variables up before form is built.
*/
public function preProcess() {
}
$this->assign('contribution_status_id', CRM_Utils_Array::value('contribution_status_id', $defaults));
- $dates = array('receive_date', 'receipt_date', 'cancel_date', 'thankyou_date');
+ $dates = array(
+ 'receive_date',
+ 'receipt_date',
+ 'cancel_date',
+ 'thankyou_date',
+ );
foreach ($dates as $key) {
if (!empty($defaults[$key])) {
list($defaults[$key], $defaults[$key . '_time'])
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
//@todo document the purpose of cdType (if still in use)
* The uploaded files if any.
* @param $self
*
- *
* @return bool|array
* true if no errors, else array of errors
*/
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function postProcess() {
$sendReceipt = $pId = $contribution = $isRelatedId = FALSE;
}
/**
- * @param $submittedValues
- * @param $config
+ * Process credit card payment.
+ *
+ * @param array $submittedValues
+ * @param array $config
* @param CRM_Core_Session $session
- * @param $lineItem
+ * @param array $lineItem
*
* @throws CRM_Core_Exception
*/
}
/**
+ * Clean up DB after payment fails.
+ *
+ * This function removes related DB entries. Note that it has been agreed in principle,
+ * but not implemented, that contributions should be retained as 'Failed' rather than
+ * deleted.
+ *
+ * @todo it doesn't clean up line items.
+ *
* @param array $paymentParams
- * @param $message
+ * @param string $message
*/
public function cleanupDBAfterPaymentFailure($paymentParams, $message) {
- //make sure to cleanup db for recurring case.
+ // Make sure to cleanup db for recurring case.
if (!empty($paymentParams['contributionID'])) {
CRM_Core_Error::debug_log_message($message .
"contact id={$this->_contactID} (deleting contribution {$paymentParams['contributionID']}");