Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Extensions
authnet
Commits
df597737
Commit
df597737
authored
Aug 25, 2020
by
mattwire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues with subsequent recurring payments
parent
decc808c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
CRM/Core/Payment/AuthNetIPN.php
CRM/Core/Payment/AuthNetIPN.php
+5
-2
No files found.
CRM/Core/Payment/AuthNetIPN.php
View file @
df597737
...
...
@@ -92,13 +92,16 @@ class CRM_Core_Payment_AuthNetIPN {
switch
(
$this
->
eventType
)
{
case
'net.authorize.payment.authcapture.created'
:
// Notifies you that an authorization and capture transaction was created.
// invoice_id is the same for all completed payments in a authnet subscription (recurring contribution)
// transaction_id is unique for each completed payment in a authnet subscription (recurring contribution)
// subscription_id is set on the recurring contribution and is unique per authnet subscription.
$contribution
=
$this
->
getContributionFromTrxnInfo
(
$this
->
getParamFromResponse
(
$response
,
'invoice_id'
));
$pendingStatusId
=
CRM_Core_PseudoConstant
::
getKey
(
'CRM_Contribute_BAO_Contribution'
,
'contribution_status_id'
,
'Pending'
);
if
(
$contribution
&&
(
$contribution
[
'contribution_status_id'
]
==
$pendingStatusId
))
{
$params
=
[
'contribution_id'
=>
$contribution
[
'id'
],
'trxn_id'
=>
$this
->
getParamFromResponse
(
$response
,
'transaction_id'
),
'order_reference'
=>
$this
->
getParamFromResponse
(
$response
,
'
invoice
_id'
),
'order_reference'
=>
$this
->
getParamFromResponse
(
$response
,
'
transaction
_id'
),
'trxn_date'
=>
$this
->
event_date
,
'total_amount'
=>
$this
->
getParamFromResponse
(
$response
,
'total_amount'
),
'contribution_status_id'
=>
$contribution
[
'contribution_status_id'
]
...
...
@@ -108,7 +111,7 @@ class CRM_Core_Payment_AuthNetIPN {
elseif
(
$this
->
getParamFromResponse
(
$response
,
'is_recur'
))
{
$params
=
[
'trxn_id'
=>
$this
->
getParamFromResponse
(
$response
,
'transaction_id'
),
'order_reference'
=>
$this
->
getParamFromResponse
(
$response
,
'
invoice
_id'
),
'order_reference'
=>
$this
->
getParamFromResponse
(
$response
,
'
transaction
_id'
),
'receive_date'
=>
$this
->
event_date
,
'contribution_recur_id'
=>
$this
->
contribution_recur_id
,
'contribution_status_id'
=>
CRM_Core_PseudoConstant
::
getKey
(
'CRM_Contribute_BAO_Contribution'
,
'contribution_status_id'
,
'Completed'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment