// add some financial type details to the params list
// if folks need to use it
+ //CRM-15297 deprecate contributionTypeID
+ $paymentParams['financial_type_id'] = $paymentParams['financialTypeID'] = $paymentParams['contributionTypeID'] = $financialType->id;
//CRM-15297 - contributionType is obsolete - pass financial type as well so people can deprecate it
$paymentParams['financialType_name'] = $paymentParams['contributionType_name'] = $form->_params['contributionType_name'] = $financialType->name;
//CRM-11456
}
$paymentParams['contributionID'] = $contribution->id;
- //CRM-15297 deprecate contributionTypeID
- $paymentParams['financialTypeID'] = $paymentParams['contributionTypeID'] = $contribution->financial_type_id;
$paymentParams['contributionPageID'] = $contribution->contribution_page_id;
if (isset($paymentParams['contribution_source'])) {
$paymentParams['source'] = $paymentParams['contribution_source'];
*
* Comments from previous refactor indicate doubt as to what was going on.
*
- * @param int $contributionTypeId
+ * @param int $financialTypeID
*
* @return null|string
*/
- public function wrangleFinancialTypeID($contributionTypeId) {
- if (isset($paymentParams['financial_type'])) {
- $contributionTypeId = $paymentParams['financial_type'];
- }
- elseif (!empty($this->_values['pledge_id'])) {
- $contributionTypeId = CRM_Core_DAO::getFieldValue('CRM_Pledge_DAO_Pledge',
+ public function wrangleFinancialTypeID($financialTypeID) {
+ if (empty($financialTypeID) && !empty($this->_values['pledge_id'])) {
+ $financialTypeID = CRM_Core_DAO::getFieldValue('CRM_Pledge_DAO_Pledge',
$this->_values['pledge_id'],
'financial_type_id'
);
}
- return $contributionTypeId;
+ return $financialTypeID;
}
/**