Skip to content

Commit

Permalink
release 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jitendrapurohit committed Oct 26, 2024
1 parent 958b5a3 commit 1e14b8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions CRM/Extrafee/Fee.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static function displayFeeMessage($form, $extraFeeSettings) {
$form->set('amount', 0);
$form->assign('payNowPayment', FALSE);
if (!empty($form->_ccid) && !empty($form->_pendingAmount)) {
$form->_pendingAmount += $form->_pendingAmount * $percent/100 + $processingFee;
$form->_pendingAmount += $form->_pendingAmount * $percent / 100 + $processingFee;
$form->assign('pendingAmount', $form->_pendingAmount);
$form->assign('payNowPayment', TRUE);
}
Expand All @@ -35,7 +35,7 @@ public static function displayFeeMessage($form, $extraFeeSettings) {
$form->assign('extraFeeOptional', $extraFeeSettings['optional']);
$form->assign('quick_config_display', $priceSet['is_quick_config']);
CRM_Core_Region::instance('page-body')->add([
'template' => CRM_Extrafee_ExtensionUtil::path('templates/extra_fee.tpl')
'template' => CRM_Extrafee_ExtensionUtil::path('templates/extra_fee.tpl'),
]);
}
}
Expand Down Expand Up @@ -84,10 +84,10 @@ public static function modifyTotalAmountInParams($formName, &$form, $extraFeeSet
if (in_array($formName, [
'CRM_Contribute_Form_Contribution_Main',
'CRM_Contribute_Form_Contribution_Confirm',
'CRM_Contribute_Form_Contribution_ThankYou'
'CRM_Contribute_Form_Contribution_ThankYou',
])) {
if (!empty($form->_params['amount'])) {
$extrafee_amount = $form->_params['amount'] * $percent/100 + $processingFee;
$extrafee_amount = $form->_params['amount'] * $percent / 100 + $processingFee;
$extrafee_amount = round(CRM_Utils_Rule::cleanMoney($extrafee_amount), 2);

$lineItems = $form->getOrder()->getLineItems();
Expand All @@ -111,7 +111,7 @@ public static function modifyTotalAmountInParams($formName, &$form, $extraFeeSet
}
elseif ($formName == 'CRM_Event_Form_Registration_Register') {
if (!empty($params[0]['amount'])) {
$params[0]['amount'] += $params[0]['amount'] * $percent/100 + $processingFee;
$params[0]['amount'] += $params[0]['amount'] * $percent / 100 + $processingFee;
$params[0]['amount'] = round(CRM_Utils_Rule::cleanMoney($params[0]['amount']), 2);
$form->setVar('_params', $params);
$form->set('params', $params);
Expand Down Expand Up @@ -165,6 +165,7 @@ public static function getProcessorExtraFees() {
}
}
return $ppExtraFeeSettings;
}
}
}

}
4 changes: 2 additions & 2 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<url desc="Main Extension Page">https://github.com/fuzionnz/nz.co.fuzion.extrafee</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2020-02-02</releaseDate>
<version>1.2</version>
<releaseDate>2024-10-26</releaseDate>
<version>1.4</version>
<develStage>beta</develStage>
<compatibility>
<ver>5.38</ver>
Expand Down

0 comments on commit 1e14b8a

Please sign in to comment.