Skip to content

Commit

Permalink
Set contribution_page_id from template contribution
Browse files Browse the repository at this point in the history
This is tested in AuthorizeNetIPNTest::testIPNPaymentRecurNoReceipt
  • Loading branch information
eileenmcnaughton committed Jan 11, 2021
1 parent df1fc58 commit 6c3e774
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@ protected static function repeatTransaction(&$contribution, $input, $contributio
else {
$contributionParams['financial_type_id'] = $templateContribution['financial_type_id'];
}
foreach (['contact_id', 'currency', 'source', 'amount_level', 'address_id', 'on_behalf', 'source_contact_id', 'tax_amount'] as $fieldName) {
foreach (['contact_id', 'currency', 'source', 'amount_level', 'address_id', 'on_behalf', 'source_contact_id', 'tax_amount', 'contribution_page_id'] as $fieldName) {
if (isset($templateContribution[$fieldName])) {
$contributionParams[$fieldName] = $templateContribution[$fieldName];
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Core/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ public function getCancelUrl($qfKey, $participantID) {
/**
* Get URL to return the browser to on success.
*
* @param $qfKey
* @param string $qfKey
*
* @return string
*/
Expand Down
3 changes: 0 additions & 3 deletions CRM/Core/Payment/AuthorizeNetIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ public function main() {
//load new contribution object if required.
// create a contribution and then get it processed
$contribution = new CRM_Contribute_BAO_Contribution();
$contribution->contribution_page_id = $ids['contributionPage'];
$contribution->contribution_recur_id = $ids['contributionRecur'];
$contribution->receive_date = $input['receive_date'];
}
$input['payment_processor_id'] = $paymentProcessorID;
$isFirstOrLastRecurringPayment = $this->recur($input, $contributionRecur, $contribution, $first);
Expand Down

0 comments on commit 6c3e774

Please sign in to comment.