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

Dynamic selection of payment processor #571

Open
bjorntore opened this issue Apr 9, 2024 · 1 comment
Open

Dynamic selection of payment processor #571

bjorntore opened this issue Apr 9, 2024 · 1 comment
Assignees

Comments

@bjorntore
Copy link
Contributor

bjorntore commented Apr 9, 2024

In order to support the option of doing invoicing through other channels than Nets, for instance from Unit4 after the form has been submitted, we believe we need to support dynamic selection of payment processor. That would enable apps to make a custom payment processor implementation for invoices handled outside the app, which does very little and just allows the process to continue.

  1. We ensure that it works to have multiple payment steps in a single process and leaves it up to the user to write gateways to select the task that uses the correct payment processor.

  2. We extend the IOrderDetailsCalculator interface to give the service owner the possibility to determine the correct payment processor through C# logic, based on the form data or some other variable. Then we just use whatever they tell us when calling start payment. Luftfartstilsynet could then have a mock payment processor which does basically nothing for when they are going to do the invoicing themselves.

  3. We create a default "Select a payment processor" GUI, where we just list the different payment processors with a friendly name and give a out-of-the-box experience for all service owners. This GUI would not show if only one payment provider is configured on the process step.

The payment processor that is used for a payment is already stored in paymentInformation.json.

@bjorntore bjorntore transferred this issue from Altinn/app-frontend-react Apr 9, 2024
@ivarne
Copy link
Member

ivarne commented Apr 10, 2024

I updated list with the alternative to use separate payment tasks and process gateways to select the correct one.

Also I think these are not so much alternatives, but different levels of functionality we can implement.

  1. There are no reason we should have something that does not support separate payment taks, so this solutions will be availible anyway.

  2. Even if we add GUI for the user to select the payment provider, it makes sense to let the app developer both restrict the set of choices or provide a default selection through IOrderDetailsCalculator

@bjorntore bjorntore moved this from 📈 Todo to 👷 In Progress in Team Apps Apr 11, 2024
@bjorntore bjorntore moved this from 👷 In Progress to ✅ Done in Team Apps Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants