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

Allow querying completed and expired receivers (incoming payments) #3253

Open
3 tasks
mkurapov opened this issue Jan 29, 2025 · 0 comments · May be fixed by #3314
Open
3 tasks

Allow querying completed and expired receivers (incoming payments) #3253

mkurapov opened this issue Jan 29, 2025 · 0 comments · May be fixed by #3314
Assignees
Labels
pkg: backend Changes in the backend package. type: bug Something isn't working

Comments

@mkurapov
Copy link
Contributor

Context

In our backend GraphQL Admin API, we have a receiver query. It allows fetching a "local" incoming payment or a remote incoming payment, which is fetched at a different Rafiki instance using Open Payments.

Currently, the receiver query returns a payment only if it hasn't been completed yet. This is not the intended behaviour.

Expected behaviour

We should be able to fetch a receiver (local or remote incoming payment), even if it has already been completed.

The logic that needs to be changed is in the Receiver class, as we do not allow constructing a new Receiver instance from a payment that has been completed, expired, or has an empty methods array. We need to move those checks from inside the constructor directly to the places where they are needed (like during quote creation or outgoing payment processing).

Todos

  • Allow creating Receiver instances even if the payment is completed, expired, or has an empty methods array
  • Move those checks to the correct places where they are needed
  • Make sure the receiver Admin API query returns incoming payments even if they are completed or expired
@github-project-automation github-project-automation bot moved this to Backlog in Rafiki Jan 29, 2025
@mkurapov mkurapov added pkg: backend Changes in the backend package. type: bug Something isn't working labels Jan 29, 2025
@cozminu cozminu moved this from Backlog to Todo in Rafiki Feb 13, 2025
@cozminu cozminu moved this from Todo to In Progress in Rafiki Feb 13, 2025
@cozminu cozminu linked a pull request Feb 21, 2025 that will close this issue
6 tasks
@cozminu cozminu moved this from In Progress to Ready for Review in Rafiki Feb 21, 2025
@mkurapov mkurapov moved this from Ready for Review to In Progress in Rafiki Feb 25, 2025
@cozminu cozminu moved this from In Progress to Ready for Review in Rafiki Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: backend Changes in the backend package. type: bug Something isn't working
Projects
Status: Ready for Review
Development

Successfully merging a pull request may close this issue.

2 participants