Skip to content

sim4life.io - WP10: Payment Gateway #1027

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

Closed
17 tasks done
SCA-ZMT opened this issue Jul 21, 2023 · 6 comments
Closed
17 tasks done

sim4life.io - WP10: Payment Gateway #1027

SCA-ZMT opened this issue Jul 21, 2023 · 6 comments
Assignees
Labels
PO issue Created by Product owners s4l:web sim4life product in osparc.io

Comments

@SCA-ZMT
Copy link
Contributor

SCA-ZMT commented Jul 21, 2023

From an organization's perspective

  • we add a new role of Accountant to organizations (multiple Accountants are possible)
    • an Accountant can:
      • create wallets, from now on credit accounts, associated with the organization
      • buy credits for the credit accounts
      • make the credit accounts available to chosen organization members
        (increase awareness of which wallet is actually used - by specifying, or asking/clicking)

From a single user's perspective

  • a user's default wallet (on account creation) is associated to their own personal group. This can't be shared, but it can be disabled.
    • few free welcome credits could be loaded in this private wallet.
  • a user / login can have access to additional credit accounts, if shared by the Accountants of organizations they belong to
  • the default wallet for billing newly created studies/projects can be changed in the user preferences
  • when opening a study/project, a view prompts the user allowing them to:
    • choose a wallet to charge for this specific session.
  • in order not to confront users with cost selections too often, a study/project remembers the hw configuration and wallet that was last chosen when opening it, but allows to change them again
  • an indicator at the top of the UI shows in real time the credits available on the default wallet, or the wallet chosen for the currently opened project
  • clicking on the indicators opens a view containing the following tabs:
    • an overview of the credits on all available credit accounts,
    • a list of past transaction
    • a dialog to buy more credits for the credit accounts of which the user is Accountant

One time payment:

  • User selects the amount of dollars to be charged in a specific wallet
  • Depending on the type of user (commercial, academic or science) the credit price will be different
  • Once the payment transaction is completed, the credits are topped up and the invoice can be found in the transactions section

Auto recharge:

  • User can add a payment method (associated to his wallet)
  • User defines a lower threshold for the credits. Once it goes below that number, an automatic transaction (with an amount also defined by the user) is started and charged to the payment method.
  • For this automatic transaction, the credit card needs to first be stored in Stripe. oSPARC will only keep a reference to that Payment method.

2nd iteration:

  • when opening a study/project, a view prompts the user allowing them to:
    • a default hardware tier is selected, but the user can go into the advanced settings where other options are available (low/mid/high) corresponding to a cost of credits/hour.
  • the default hardware tier (s/m/l) per user is exposed in the User Preferences

### Tasks
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/4752
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/5116
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/5115
### Schoggilebe
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/5227
- [ ] https://github.com/ITISFoundation/osparc-ops-environments/pull/621
- [x] Add backup for appmotion database
- [x] Billing center v2 UI
### This is Sparta!
- [ ] https://github.com/ITISFoundation/appmotion-exchange/issues/13
### Kabayashi Maru
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/4657
- [ ] https://github.com/ITISFoundation/osparc-simcore/pull/5057
### Microhistory
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/4751
- [x] a user's default wallet (on account creation) is associated to their own personal group
- [x] Auto-recharge: backend functionality @pcrespov @matusdrobuliak66
- [x] Auto-recharge: complete frontend @odeimaiz
- [x] App Motion's feedback @odeimaiz @ignapas @jsaq007
@matusdrobuliak66 matusdrobuliak66 added PO issue Created by Product owners s4l:web sim4life product in osparc.io labels Jul 24, 2023
@drniiken drniiken changed the title Frontend: Show user credits @odeimaiz Frontend: Payment, Show user credits, etc. @odeimaiz Jul 24, 2023
@drniiken drniiken changed the title Frontend: Payment, Show user credits, etc. @odeimaiz Frontend: Payment, Show user credits, etc. Jul 24, 2023
@matusdrobuliak66 matusdrobuliak66 changed the title Frontend: Payment, Show user credits, etc. Payment, Show user credits, etc. Jul 24, 2023
@matusdrobuliak66 matusdrobuliak66 added this to the Sundae milestone Jul 24, 2023
@matusdrobuliak66 matusdrobuliak66 self-assigned this Jul 25, 2023
@drniiken
Copy link
Member

In the 7th "S4L retreat" (15.08.2023) it was discussed and agreed that the so far provided working prototype in the UI will be adapted (from a design, perception point of view) to the look of the new S4L website (AppMotion):

  • all the data (database, names, credits, etc.) stays on our side !
  • AppMotion will help us in the design of this page (pages) - smoothly matching with the "new website"
  • finally, we might just render a website on top, being called from our platform
  • deploy/login will be provided to AppMotion, Slack channel, etc. (ongoing)

@odeimaiz @mguidon @mrnicegyu11

@matusdrobuliak66 matusdrobuliak66 modified the milestones: Sundae, Baklava Aug 22, 2023
@odeimaiz
Copy link
Member

odeimaiz commented Aug 22, 2023

Payment gateway:

  • URL containing required data
    • user id
    • wallet id
    • amount of credits
    • total price
    • session id
  • Endpoint that the 3rd party middleware will call with the transaction data
    • transaction id
    • transaction state
    • session id

Transactions:

  • Make invoices available

Resource selection:

  • Preferred wallet in User Preferences
  • Preferred tier in User Preferences
  • Tiers per service/version

Wallets:

  • Personal wallet automatically created OR button for creating it
    • 20 credits for welcoming users?

Wallets and APIs:

Credits:

  • Discounts?
  • Update the frontend via websocket
  • Do not let start services if credits are too low? What's too low?
  • Set a limit in the wallet?
  • What to do when they go red

Usage overview:

  • Per wallet
  • List usage of all users if accountant
  • List my usage

Accountant log in: @pcrespov

https://osparc.io/#!/{page}?param1={param}&param2={param}

@drniiken
Copy link
Member

drniiken commented Sep 13, 2023

Additional information:

Meeting Minutes, Special Meeting on Payment Infrastructure, 20230901

https://git.speag.com/oSparc/osparc-issues/-/issues/140

@pcrespov
Copy link
Member

pcrespov commented Oct 31, 2023

Update Microhistory

What works and is accessible and ready for testing

  • full workflow on on-time-payment as in the issue description

What will work in 3 weeks from now

  • payment-methods (front-end ready, backend almost ready and payment-gateway still under dev)
    • add/remove
    • auto-recharge
    • pay w/ payment-method
  • Product based login. almost ready
  • get ownership and deploy app-motion's payments-gateway service.
  • Ensure stripe banking configurations

What will not be available in three weeks from now

No showstopper at the moment

@pcrespov pcrespov changed the title Payment, Show user credits, etc. sim4life.io - WP10 Payment, Show user credits, etc. Nov 27, 2023
@pcrespov pcrespov changed the title sim4life.io - WP10 Payment, Show user credits, etc. sim4life.io - WP10: Payment Gateway Nov 27, 2023
@pcrespov
Copy link
Member

Update 4Peaks

Most of the work here is done (see tasks above). Missing are

@pcrespov
Copy link
Member

pcrespov commented Jan 7, 2024

Update Kobayhashi Maru

Done ✅

  • 🚀 Payment system fully functional (from UI to the bank account)
  • ⚗️ Testing period: payments system used with real transactions
    • Tested auto-recharge payments
    • Tested one time payments
    • Tested management of payment methods
    • 🙈 Failures detected during testing
      • 💥 External gateway was accidentally misconfigured (app-motion)
      • 💥 Rabbit was disconnected for maintenance (AWS)
      • 🐛 Subtle bug in the front-end disabled payments-methods view
  • 🚚 Taking over the gateway from app-motion to ops stack (more effort than anticipated)
    • Build a docker image
    • Deployed as gateway stack (still under test)

Ongoing 🚧

  • 🚚 Finalising integration of the gateway as an ops stack
    • Will allow further testing in staging deploys that were not possible
  • 🔊 Enhancing user notifications and feedback: fast and effectively inform of the
  • 🚨 Increasing monitoring and alarms
    • Review and extend payments policies in the event of failure
  • 💄 UI/UX iteration on the front-end (@ignapas will explain more)

@pcrespov pcrespov modified the milestones: the nameless, This is Sparta! Jan 11, 2024
@bisgaard-itis bisgaard-itis removed this from the This is Sparta! milestone Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PO issue Created by Product owners s4l:web sim4life product in osparc.io
Projects
None yet
Development

No branches or pull requests

7 participants