Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

REST API: Payment Methods API #1321

Closed
mikejolley opened this issue Dec 4, 2019 · 3 comments
Closed

REST API: Payment Methods API #1321

mikejolley opened this issue Dec 4, 2019 · 3 comments
Labels
focus: rest api Work impacting REST api routes.

Comments

@mikejolley
Copy link
Member

This issue needs more in-depth exploration and planning.

Lists available/registered payment methods. Used by the cart to show a payment methods list (icons only), and used by the checkout to show available express and regular payment methods.

GET /payment-methods

It may be possible to use or borrow the /payment_gateways controller from the core REST API. However, we do need to factor in some unique use-cases such as the 'express' payment methods box.

Unanswered Questions/Notes:

  • Do payment method FIELDS come from the API or are they inserted by the payment gateway plugin/class?
  • Do we provide some common fields, for example, a basic credit card component for those gateways which need it?
  • What is the context for this endpoint? Is it the current customer/location, or perhaps the order being processed? How is this data passed to the endpoint?
  • How do we allow payment methods (gateways) to handle collected data?
@mikejolley mikejolley added the focus: rest api Work impacting REST api routes. label Dec 4, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label type: feature request to this issue, with a confidence of 0.71. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@nerrad
Copy link
Contributor

nerrad commented Dec 6, 2019

I'm going to explore a bit how the payment methods themselves might be able to register a component for the checkout (and what might be needed for that). That can help inform whether we need additional apis for this issue.

@nerrad
Copy link
Contributor

nerrad commented Dec 20, 2019

With the work done in #1349 it's becoming clearer that we won't need this endpoint because payment methods will be responsible for registering themselves with the new checkout and taking care of any communication with the server etc. So for now I think we can probably close this (feel free to re-open Mike if you disagree)

@nerrad nerrad closed this as completed Dec 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: rest api Work impacting REST api routes.
Projects
None yet
Development

No branches or pull requests

2 participants