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

refactor: set_as_failed method on Payment Request #40598

Closed
wants to merge 1 commit into from

Conversation

batonac
Copy link
Contributor

@batonac batonac commented Mar 21, 2024

This PR removes the set_failed method from the Payment Request Doctype, which did nothing and was referenced nowhere.

It replaces the set_failed method with a set_as_failed method which corresponds generally to the existing set_as_cancelled and set_as_paid methods, with the notable difference that it accepts a reason parameter which populates the recently-introduced failed_reason field.

This is somewhat related to my recent PR#75 on the payments app which attempts to incorporate payment status from GoCardless webhooks, including updating the failed_reason field, where applicable. In that PR I utilize the existing set_as_cancelled and set_as_paid methods for those actions, but have created a manual workaround for the absence of a set_as_failed method. It would be nice to have this consolidated eventually.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Mar 21, 2024
@batonac batonac changed the title refactor: set_as_failed method refactor: set_as_failed method on Payment Request Mar 21, 2024
Copy link

stale bot commented Apr 10, 2024

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Apr 10, 2024
@batonac
Copy link
Contributor Author

batonac commented Apr 10, 2024

Keep alive ~ Any feedback would be appreciated!

@stale stale bot removed the inactive label Apr 10, 2024
@batonac
Copy link
Contributor Author

batonac commented Apr 10, 2024

BTW, here's a quick verification that the set_failed method had no references anywhere else:
image

Copy link

stale bot commented Apr 28, 2024

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Apr 28, 2024
@stale stale bot closed this May 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
inactive needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant