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

#805 #784 As a Subscriber I can settle a negative balance myself #811

Merged
merged 31 commits into from
Mar 29, 2022

Conversation

chrisjsimpson
Copy link
Contributor

@chrisjsimpson chrisjsimpson commented Feb 22, 2022

Ref #805

What's new?

How to test

  1. As a Subscriber, subscribe and find and use test card which fails payments after inital card attachment.Take note of the failed invoice state open (As shop admin)

  2. As a Subscriber, login to the Subscriber login page

  3. As a Subscriber, locate and visit the "Failed Invoices" page:

  1. As a Subscriber Click 'Pay now' on the failed invoices page
    (failed invoices page)

6. Obvserve: You are redirected to Stripe invoice payment page 7. Use Stripe test card (e.g. the 4242 ... card) to complete the payment 8. Navigate back to shop (is this automatic?) , TODO: refresh invoices, observe the invoice is changed from status `open` to `paid`.

Details

  • New concept: "failed invoices"
  • new database table stripe_invoice Purpose: To reduce round trip time fetching invoice information from Stripe each time (cache). This is a fast cache (will not be up to date) until refreshed via a get via Stripe api. see detail
    • This is a cache which must be refreshed (either manually or automatically) to fetch Stripe invoices (reglardless of if they are failed or not- all invoices are cached using get_stripe_invoices) into the table stripe_invoice
    • Failed Stripe invoices are fetched via get_stripe_failed_subscription_invoices, which is fast because it uses the cached table stripe_invoice which stores stripe invoices. To determine a failed invoice (from Stripe's perspective is not simple: see detail)
  • new database table balance
  • new route guard @stripe_connect_id_required, purpose: see comment- does note require stripe connect is activated, only that a stripe connect id exists (and not needed for all pages)
  • New admin route /invoices/failed/ to show failed invoices, implemented by get_stripe_failed_subscription_invoices

@chrisjsimpson chrisjsimpson temporarily deployed to testing February 22, 2022 22:20 Inactive
@chrisjsimpson chrisjsimpson marked this pull request as draft February 22, 2022 22:20
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@chrisjsimpson chrisjsimpson temporarily deployed to testing February 26, 2022 19:07 Inactive
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@lgtm-com
Copy link

lgtm-com bot commented Feb 26, 2022

This pull request introduces 1 alert and fixes 1 when merging 37fdd1c into 9cd5da8 - view on LGTM.com

new alerts:

  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@lgtm-com
Copy link

lgtm-com bot commented Feb 26, 2022

This pull request introduces 1 alert and fixes 1 when merging 66935df into 9cd5da8 - view on LGTM.com

new alerts:

  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

#805 add util get_stripe_invoices

#805 add invoice/failed_invoices template
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@lgtm-com
Copy link

lgtm-com bot commented Feb 27, 2022

This pull request introduces 1 alert and fixes 1 when merging d26e57f into 9cd5da8 - view on LGTM.com

new alerts:

  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

@chrisjsimpson chrisjsimpson temporarily deployed to testing February 27, 2022 16:20 Inactive
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@lgtm-com
Copy link

lgtm-com bot commented Feb 27, 2022

This pull request introduces 1 alert and fixes 1 when merging 8d4754a into 9cd5da8 - view on LGTM.com

new alerts:

  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

#805 show links to subscriber in failed_invoices template

ref #773
@chrisjsimpson chrisjsimpson temporarily deployed to testing February 27, 2022 16:59 Inactive
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@lgtm-com
Copy link

lgtm-com bot commented Feb 27, 2022

This pull request introduces 1 alert and fixes 1 when merging 9899965 into 9cd5da8 - view on LGTM.com

new alerts:

  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

@joeltejeda joeltejeda temporarily deployed to testing March 29, 2022 00:38 Inactive
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@lgtm-com
Copy link

lgtm-com bot commented Mar 29, 2022

This pull request introduces 3 alerts and fixes 1 when merging c9ba150 into 6f46253 - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

@joeltejeda joeltejeda temporarily deployed to testing March 29, 2022 19:47 Inactive
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@lgtm-com
Copy link

lgtm-com bot commented Mar 29, 2022

This pull request introduces 3 alerts and fixes 1 when merging fa71b8f into 6f46253 - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@joeltejeda joeltejeda temporarily deployed to testing March 29, 2022 20:21 Inactive
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@lgtm-com
Copy link

lgtm-com bot commented Mar 29, 2022

This pull request introduces 3 alerts and fixes 1 when merging c39e626 into 6f46253 - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

@joeltejeda joeltejeda temporarily deployed to testing March 29, 2022 22:13 Inactive
@github-actions
Copy link

🙌 Live preview is here: http://805-subscriber-balance-concept.pcpink.co.uk

@chrisjsimpson chrisjsimpson marked this pull request as ready for review March 29, 2022 22:16
@chrisjsimpson chrisjsimpson merged commit 2227bef into master Mar 29, 2022
@github-actions
Copy link

🚀 PR was released in v0.1.55 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Mar 29, 2022
@lgtm-com
Copy link

lgtm-com bot commented Mar 29, 2022

This pull request introduces 1 alert and fixes 1 when merging c6207ff into 6f46253 - view on LGTM.com

new alerts:

  • 1 for URL redirection from remote source

fixed alerts:

  • 1 for URL redirection from remote source

@joeltejeda
Copy link
Collaborator

#785

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants