* @public
*/
public $_premiumID = NULL;
+
+ /**
+ * @var CRM_Contribute_DAO_ContributionProduct
+ */
public $_productDAO = NULL;
/**
protected $_formType;
protected $_cdType;
+ /**
+ * @param $id
+ */
public function showRecordLinkMesssage($id) {
$statusId = CRM_Core_DAO::getFieldValue('CRM_Contribute_BAO_Contribution', $id, 'contribution_status_id');
if (CRM_Contribute_PseudoConstant::contributionStatus($statusId, 'name') == 'Partially paid') {
}
}
+ /**
+ * @param $id
+ * @param $values
+ */
public function buildValuesAndAssignOnline_Note_Type($id, &$values) {
$ids = array();
$params = array('id' => $id);
CRM_Custom_Form_CustomData::setDefaultValues($this);
}
+ /**
+ * @param $id
+ * @todo - this function is a long way, non standard of saying $dao = new CRM_Contribute_DAO_ContributionProduct(); $dao->id = $id; $dao->find();
+ */
public function assignPremiumProduct($id) { //to get Premium id
$sql = "
SELECT *
*/
public function getValidProcessorsAndAssignFutureStartDate() {
$validProcessors = array();
- $processors = CRM_Core_PseudoConstant::paymentProcessor(FALSE, FALSE, "billing_mode IN ( 1, 3 )");
+ // restrict to payment_type = 1 (credit card only) and billing mode 1 and 3
+ $processors = CRM_Core_PseudoConstant::paymentProcessor(FALSE, FALSE, "billing_mode IN ( 1, 3 ) AND payment_type = 1");
foreach ($processors as $ppID => $label) {
$paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($ppID, $this->_mode);
$this->assign('hidePayPalExpress', TRUE);
}
+ /**
+ * @param $submittedValues
+ *
+ * @return mixed
+ */
public function getCurrency($submittedValues) { // get current currency from DB or use default currency
$config = CRM_Core_Config::singleton();
return $result;
}
+ /**
+ * @param $financialTypeId
+ *
+ * @return array
+ */
public function getFinancialAccounts($financialTypeId) {
$financialAccounts = array();
CRM_Core_PseudoConstant::populate($financialAccounts,
return $financialAccounts;
}
+ /**
+ * @param $financialTypeId
+ * @param $relationTypeId
+ *
+ * @return mixed
+ */
public function getFinancialAccount($financialTypeId, $relationTypeId) {
$financialAccounts = $this->getFinancialAccounts($financialTypeId);
return CRM_Utils_Array::value($relationTypeId, $financialAccounts);
}
}
+ /**
+ * @param $submittedValues
+ *
+ * @return mixed
+ */
public function unsetCreditCardFields($submittedValues) {
//Offline Contribution.
$unsetParams = array(