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

Handle duplicate notification callbacks #38

Closed
judgej opened this issue Mar 27, 2017 · 2 comments
Closed

Handle duplicate notification callbacks #38

judgej opened this issue Mar 27, 2017 · 2 comments
Assignees

Comments

@judgej
Copy link
Member

judgej commented Mar 27, 2017

Sometimes Sage Pay does not get the initial notification response that we return, so it will send the notification again. At the moment, this library will log this as an error, so Sage Pay thinks the transaction is in error and will cancel it, but the merchant site thinks it has send a valid "OK" and has no idea Sage Pay lost that response.

The solution is to check if the notification is identical to the one stored, if the current state is not PENDING. If it is the same, then, just return OK as though it were the first time it were received, and not update anything in the database.

@judgej
Copy link
Member Author

judgej commented Mar 28, 2017

Possibly related to issue #37 but more information needed to confirm that.

judgej added a commit that referenced this issue Apr 3, 2017
Only the status is checked to determine if this is a duplicate.
If the remove system, or a mittle attacker, is not trying to
change the status, then we do not need to worry about the
duplicate. It does not result in a database update.
@judgej judgej self-assigned this Apr 3, 2017
@judgej
Copy link
Member Author

judgej commented Apr 3, 2017

Released as 0.9.7

@judgej judgej closed this as completed Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant