Billing : payment system #11

Closed
opened 2022-03-15 04:49:57 +00:00 by realaravinth · 4 comments
realaravinth commented 2022-03-15 04:49:57 +00:00 (Migrated from git.batsense.net)
source code: https://git.batsense.net/Z/payments
dachary commented 2022-03-18 15:28:57 +00:00 (Migrated from git.batsense.net)

https://git.cyberia.club/cyberia/capsul-flask is an example of stripe integration. I spent way too much time looking into this yesterday.

https://git.cyberia.club/cyberia/capsul-flask is an example of stripe integration. I spent way too much time looking into this yesterday.
dachary added spent time 2022-04-08 06:39:26 +00:00
8h
dachary added a new dependency 2022-05-16 11:57:12 +00:00
realaravinth added spent time 2022-05-16 13:19:49 +00:00
2h 33min
realaravinth was assigned by dachary 2022-05-16 13:47:41 +00:00

Tasks

Tried django-payments from the JazzBand and its super simple! 🤯We might actually have payments within the MVP release! :D

References

  1. The official docs: straightforward, super simple and comes with helpful error messages when you forget to configure something
  2. An example app from the project
  3. Stripe dummy cards: stripe supports development API keys. When handling payments with development API keys, stripe only accepts payments credentials mentioned in this link.

Workflow

  1. Define payment object, and present payments form:
    image
  2. Use clicks proceed and stripe.js takes over:
    image
  3. If payment successful, user is redirected to success page
    image

And the admin gets to see it too!

image

## Tasks Tried [`django-payments`](https://jazzband.co/projects/django-payments) from the JazzBand and its super simple! :exploding_head:We might actually have payments within the MVP release! :D ## References 1. [The official docs](https://django-payments.readthedocs.io/en/latest/index.html): straightforward, super simple and comes with helpful error messages when you forget to configure something 2. [An example app from the project](https://github.com/jazzband/django-payments/tree/master/testapp) 3. [Stripe dummy cards](https://stripe.com/docs/testing#americas): stripe supports development API keys. When handling payments with development API keys, stripe only accepts payments credentials mentioned in this link. ## Workflow 1. Define payment object, and present payments form: ![image](/attachments/c9d1d13d-b2d6-4860-91f5-7294b9444585) 2. Use clicks proceed and stripe.js takes over: ![image](/attachments/7645dcbe-739f-4883-aa21-08c0d4b8d433) 3. If payment successful, user is redirected to success page ![image](/attachments/8b15d062-ef6c-40dd-a80e-60da1043e3b5) And the admin gets to see it too! ![image](/attachments/f71b0cc3-5d11-4ac7-9b83-6c88e15e14ff)
realaravinth added spent time 2022-06-19 22:26:33 +00:00
2h 30min
realaravinth added spent time 2022-06-20 19:29:08 +00:00
30min

Scraped country codes from Wikipedia for use within Payments software. Pleas see Hostea/country-codes

Scraped country codes from Wikipedia for use within Payments software. Pleas see [Hostea/country-codes](https://gitea.hostea.org/Hostea/country-codes)
realaravinth started working 2022-06-21 08:21:43 +00:00
realaravinth stopped working 2022-06-21 09:46:30 +00:00
1h 24min 47s
realaravinth started working 2022-06-21 13:23:28 +00:00
realaravinth stopped working 2022-06-21 16:43:38 +00:00
3h 20min 10s
realaravinth started working 2022-06-21 17:00:59 +00:00

Payments system is implemented using stripe. Copy-pasting commit message:

SUMMARY
    PAYMENT WORKFLOW
        1. User is redirected after a new instance is created into a view
           that generates invoice. There are checks in place to ensure
           invoices are not generated twice for the same VM. There is also a
           check in place to generate invoices for time periods that are
           already paid for
        2. User is redirected to payment form
        3. Stripe takes over
        4. If payment is successful, user is redirected to success page
        5. If payment failed, user is redirected to failure page

    PENDING INVOICES
		The user can see pending invoices on their dashboard

    PAYMENT RECEIPTS
		The user can see payment receipts on their dashboard
Payments system is implemented using stripe. Copy-pasting commit message: ``` SUMMARY PAYMENT WORKFLOW 1. User is redirected after a new instance is created into a view that generates invoice. There are checks in place to ensure invoices are not generated twice for the same VM. There is also a check in place to generate invoices for time periods that are already paid for 2. User is redirected to payment form 3. Stripe takes over 4. If payment is successful, user is redirected to success page 5. If payment failed, user is redirected to failure page PENDING INVOICES The user can see pending invoices on their dashboard PAYMENT RECEIPTS The user can see payment receipts on their dashboard ```
realaravinth stopped working 2022-06-21 19:18:41 +00:00
2h 17min 42s
Sign in to join this conversation.
There is no content yet.