Skip to content

Commit

Permalink
CRM-17647 fix for submitting payment with thousand separator
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Feb 10, 2018
1 parent 940762f commit 9d9f252
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public static function add(&$params, $ids = array()) {
else {
// @todo put a deprecated here - this should be done in the form layer.
$params['skipCleanMoney'] = FALSE;
Civi::log()->warning('Deprecated code path. Money should always be clean before it hits the BAO.', array('civi.tag' => 'deprecated'));
}

foreach ($moneyFields as $field) {
Expand Down
2 changes: 1 addition & 1 deletion CRM/Event/Form/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ public function submit($params) {
}
if ($this->_isPaidEvent) {

$contributionParams = array();
$contributionParams = array('skipCleanMoney' => TRUE);
$lineItem = array();
$additionalParticipantDetails = array();
if (CRM_Contribute_BAO_Contribution::checkContributeSettings('deferred_revenue_enabled')) {
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function testCreateSingleNowDated() {
'is_test' => 1,
'contribution_status_id' => 2,
);
$contribution = CRM_Contribute_BAO_Contribution::add($contributionParams);
$contribution = $this->callAPISuccess('Contribution', 'create', $contributionParams);

$params = array(
'qfKey' => '08ed21c7ca00a1f7d32fff2488596ef7_4454',
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function testdelIfHasContribution() {
'financial_type_id' => $financialType->id,
'contribution_status_id' => 1,
);
$contributions = CRM_Contribute_BAO_Contribution::create($contributionParams);
$this->callAPISuccess('Contribution', 'create', $contributionParams);
CRM_Financial_BAO_FinancialAccount::del($result->id);
$params = array('id' => $result->id);
$result = CRM_Financial_BAO_FinancialAccount::retrieve($params, $defaults);
Expand Down

0 comments on commit 9d9f252

Please sign in to comment.