Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mjwshared
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wmortada
mjwshared
Commits
b83725b2
Commit
b83725b2
authored
4 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#2
Don't update receive_date when marking a contribution as failed
parent
4b1d1fd2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/Payment/MJWIPNTrait.php
+5
-4
5 additions, 4 deletions
CRM/Core/Payment/MJWIPNTrait.php
with
5 additions
and
4 deletions
CRM/Core/Payment/MJWIPNTrait.php
+
5
−
4
View file @
b83725b2
...
...
@@ -321,18 +321,19 @@ trait CRM_Core_Payment_MJWIPNTrait {
/**
* Update a contribution to failed
*
* @param array $params ['
id', 'receive_date', 'trxn_id',
{, cancel_date, cancel_reason}]
* @param array $params ['
contribution_id', 'order_reference'
{, cancel_date, cancel_reason}]
*
* @throws \CiviCRM_API3_Exception
* @throws \Civi\Payment\Exception\PaymentProcessorException
*/
private
function
updateContributionFailed
(
$params
)
{
$this
->
checkRequiredParams
(
'updateContributionFailed'
,
[
'contribution_id'
,
'trxn_date'
,
'order_reference'
],
$params
);
$this
->
checkRequiredParams
(
'updateContributionFailed'
,
[
'contribution_id'
,
'order_reference'
],
$params
);
civicrm_api3
(
'Contribution'
,
'create'
,
[
'id'
=>
$params
[
'contribution_id'
],
'contribution_status_id'
=>
'Failed'
,
'
receive_date
'
=>
$params
[
'
trxn_date
'
],
'
id
'
=>
$params
[
'
contribution_id
'
],
'trxn_id'
=>
$params
[
'order_reference'
],
'cancel_date'
=>
$params
[
'cancel_date'
]
??
NULL
,
'cancel_reason'
=>
$params
[
'cancel_reason'
]
??
NULL
,
]);
// No financial_trxn is created so we don't need to update that.
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment