Remove deprecated stripe_id from User model
- Remove User.stripe_id column (no longer used with Stripe Checkout) - Show billing link to all authenticated users in phone menu - Remove old Stripe customer cleanup from tests
This commit is contained in:
parent
dd63ff22f3
commit
a0206833a9
3 changed files with 1 additions and 12 deletions
|
|
@ -120,9 +120,6 @@ class User(RBase, Base):
|
|||
default='auto',
|
||||
nullable=False,
|
||||
)
|
||||
# example: cus_12345678AbCdEF but may be null.
|
||||
stripe_id = Column(Unicode(18), unique=True, nullable=True)
|
||||
|
||||
votes = relationship(argument="Vote", backref="user", order_by="desc(Vote.created)")
|
||||
|
||||
# lazy='dynamic' returns a query object instead of collection.
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@
|
|||
{%- if request.user.authenticated %}
|
||||
<span class="avoidwrap"><li>{{ snippets.user_link(request.user) }} <a href="/log-out">[log out]</a></li></span>
|
||||
<li><a href="{{ request.link_prefix }}/u/settings">account settings</a></li>
|
||||
{% if request.user.stripe_id %}
|
||||
<li><a href="{{ request.link_prefix }}/billing">payment preferences</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{{ request.link_prefix }}/billing">billing</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ request.app_url }}/join-or-log-in?return-to={{ request.path_url }}">join-or-log-in</a></li>
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import transaction
|
||||
import unittest
|
||||
import webtest
|
||||
import stripe
|
||||
|
||||
from remarkbox.models import (
|
||||
Node,
|
||||
|
|
@ -158,8 +157,6 @@ class AuthenticatedFunctionalTests(FunctionalTests):
|
|||
# Python 3.
|
||||
FunctionalTests.setUpClass.__func__(cls)
|
||||
|
||||
stripe.api_key = cls.settings["app.stripe.secret"]
|
||||
|
||||
def setUp(self):
|
||||
# create test_user1
|
||||
self.test_user1 = get_or_create_user_by_email(
|
||||
|
|
@ -195,9 +192,6 @@ class AuthenticatedFunctionalTests(FunctionalTests):
|
|||
self.test_creds2 = ("test2@remarkbox.com", self.raw_otp2)
|
||||
|
||||
def _clean_up_test_user(self, user):
|
||||
if user.stripe_id:
|
||||
# delete remote test Customer object on Stripe's test API.
|
||||
stripe.Customer.retrieve(user.stripe_id).delete()
|
||||
self.dbsession.delete(user)
|
||||
|
||||
def tearDown(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue