-
Notifications
You must be signed in to change notification settings - Fork 17
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
PP-13419 Handle new successful refund notification #5701
Conversation
086fea2
to
06685fb
Compare
} | ||
|
||
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 [{}]", |
There was a problem hiding this comment.
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
src/main/java/uk/gov/pay/connector/gateway/worldpay/WorldpayNotificationService.java
Outdated
Show resolved
Hide resolved
06685fb
to
76cbadf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOKTM
Thank you, @SandorArpa :) |
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