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

PP-13419 Handle new successful refund notification #5701

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

marcotranchino
Copy link
Contributor

With this change, we are no longer ignoring the SENT_FOR_REFUND notification sent by Worldpay after a refund submission.

The notification is now included in the REFUND_STATUSES and examined: if it contains a RefundAuthorisationReference, then it means that the refund submission was successful, otherwise the notification is ignored.

Since we are now processing different types of notifications arriving after a successful refund, we are also introducing a check in the Refund Notification Processor, to avoid setting a refund as successful multiple times, also avoiding multiple emails to the end user.

Further information in Jira.

https://payments-platform.atlassian.net/browse/PP-13419

@marcotranchino marcotranchino force-pushed the PP-13419-stop-ingnoring-sent-for-refund branch 2 times, most recently from 086fea2 to 06685fb Compare January 24, 2025 16:10
}

if (isRefundTransitionIllegal(oldStatus, newStatus)) {
logger.error("Notification received for refund [{}] is unexpected and therefore ignored because it would cause an illegal state transition to [{}] as refund is already in state [{}]",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a separate ticket to handle this scenario and get alerted: [Should] Alert Pay Support in case of illegal state transitions

With this change, we are no longer ignoring the SENT_FOR_REFUND notification
sent by Worldpay after a refund submission.

The notification is now included in the REFUND_STATUSES and examined: if it
contains a RefundAuthorisationReference, then it means that the refund
submission was successful, otherwise the notification is ignored.

Since we are now processing different types of notifications arriving after a
successful refund, we are also introducing a check in the Refund Notification
Processor, to avoid setting a refund as successful multiple times, also
avoiding multiple emails to the end user.

Further information in Jira.

https://payments-platform.atlassian.net/browse/PP-13419
@marcotranchino marcotranchino force-pushed the PP-13419-stop-ingnoring-sent-for-refund branch from 06685fb to 76cbadf Compare January 27, 2025 10:45
@marcotranchino marcotranchino marked this pull request as ready for review January 27, 2025 11:20
Copy link
Contributor

@SandorArpa SandorArpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOKTM

@marcotranchino marcotranchino merged commit 5bdee27 into master Jan 27, 2025
12 checks passed
@marcotranchino marcotranchino deleted the PP-13419-stop-ingnoring-sent-for-refund branch January 27, 2025 12:23
@marcotranchino
Copy link
Contributor Author

Thank you, @SandorArpa :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants