diff --git a/CRM/Core/Payment/MJWIPNTrait.php b/CRM/Core/Payment/MJWIPNTrait.php index f6f5913857f84dfc2da2ed92ef2a029165d96291..067d9935d3e4258bda1919b50578ffa2d9f67ec7 100644 --- a/CRM/Core/Payment/MJWIPNTrait.php +++ b/CRM/Core/Payment/MJWIPNTrait.php @@ -248,11 +248,27 @@ trait CRM_Core_Payment_MJWIPNTrait { $paymentParams['contribution_id'] = $contribution['id']; $paymentParams['is_send_contribution_notification'] = $this->getSendEmailReceipt(); $paymentParams['skipCleanMoney'] = TRUE; - - $payment = civicrm_api3('Mjwpayment', 'create_payment', $paymentParams); + civicrm_api3('Mjwpayment', 'create_payment', $paymentParams); } } + /** + * @param array $params + * + * @throws \CiviCRM_API3_Exception + * @throws \Civi\Payment\Exception\PaymentProcessorException + */ + private function updateContribution($params) { + $this->checkRequiredParams('updateContribution', ['contribution_id'], $params); + $params['id'] = $params['contribution_id']; + unset($params['contribution_id']); + $params['skipCleanMoney'] = TRUE; + $params['skipRecentView'] = TRUE; + $params['skipLineItem'] = TRUE; + $params['is_post_payment_create'] = TRUE; + civicrm_api3('Contribution', 'create', $params); + } + /** * Complete a pending contribution and update associated entities (recur/membership) *