Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean return values for dummy payment processor #22679

Merged
merged 1 commit into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CRM/Core/Payment/Dummy.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ public function doPayment(&$params, $component = 'contribute') {
}
}

// We shouldn't do this but it saves us changing the `testPayNowPayment` test to actually test the contribution
// like it should.
$result = array_merge($params, $result);

return $result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function testPayNowPayment(): void {
);

// Make sure that certain parameters are set on return from processConfirm
$this->assertEquals('Campaign Contribution', CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'financial_type_id', $processConfirmResult['financial_type_id']));
$this->assertEquals('Campaign Contribution', CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'financial_type_id', $processConfirmResult['contribution']->financial_type_id));

// Based on the processed contribution, complete transaction which update the contribution status based on payment result.
if (!empty($processConfirmResult['contribution'])) {
Expand Down