Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Implement Stripe #816

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rptrchv
Copy link
Contributor

@rptrchv rptrchv commented Mar 25, 2020

No description provided.

@rptrchv rptrchv changed the title [WIP]Implement Stripe Implement Stripe Mar 27, 2020
Copy link
Contributor

@a-martynovich a-martynovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code:

  1. Lots of reformatting, can't tell if the reformatted code differs from the original
  2. Some commented out code

Settings page:
Снимок экрана 2020-03-30 в 20 46 32

  1. "trialing" should either be capitalized or changed to something like "Trial" or "In Trial" @vpetersson wdyt?
  2. Monthly Charge should show currency
  3. UX issue: you can cancel subscription if you switch from Standard too Free. But you have to know that. There is no "Cancel Subscription" button, but I believe there should be. @vpetersson wdyt?
  4. (Safari only): white square instead of an icon:

Снимок экрана 2020-03-30 в 21 13 01

Nodes page
image
I believe this warning is not completely styled. It doesn't agree with dialog boxes on other pages. Looks nice though.

if device.payment_status == 'unpaid':
return HttpResponseForbidden()
context = self.get_context_data(**kwargs)
return self.render_to_response(context)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated since 2.0

if self.object.payment_status == 'unpaid':
return HttpResponseForbidden()
context = self.get_context_data(object=self.object)
return self.render_to_response(context)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated since 2.0

@@ -571,6 +564,8 @@ def _actions(self, device_pk=None):
actions_by_id = defaultdict(list)
affected_devices = set()
for ra in active_actions:
if ra.device.payment_status == 'unpaid':
continue # Filter out actions for unpaid devices.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very slow. Slows down RA page generation by 3x. Needs optimization: either prefetch_related or annotation.

@a-martynovich
Copy link
Contributor

Another issue I've found:
The RAs for unpaid nodes are not filtered in Dashboard view like they are in RA view. I need to see if this filtering affects performance in Dashboard as bad as it does in RA view. Also I can't forcefully switch from "paid" to "free" myself without Stripe access.

@vpetersson
Copy link
Contributor

@rptrchv Does this PR deprecate #735, #727 and #576?

@a-martynovich
Copy link
Contributor

Rebased the branch on top of master. All issues remain.

@vpetersson
Copy link
Contributor

Rebased the branch on top of master. All issues remain.

Right, but does it include the code base from all the other PRs?

@vpetersson
Copy link
Contributor

"trialing" should either be capitalized or changed to something like "Trial" or "In Trial"

Correct. It should be title cased.

UX issue: you can cancel subscription if you switch from Standard too Free. But you have to know that. There is no "Cancel Subscription" button, but I believe there should be. @vpetersson wdyt?

Having a cancel feature would indeed make sense here.

I believe this warning is not completely styled. It doesn't agree with dialog boxes on other pages. Looks nice though.

Yeah it doesn't seem to have the same style guide as the rest of the pages, but I can live with that for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants