Remove old stripe_id references from tests and docs
This commit is contained in:
parent
a0206833a9
commit
884d5afd7d
3 changed files with 7 additions and 73 deletions
|
|
@ -173,9 +173,9 @@ To list paying customers, execute:
|
|||
|
||||
.. code-block:: sql
|
||||
|
||||
SELECT * FROM rb_pay_what_you_can
|
||||
INNER JOIN rb_user ON rb_user.id = rb_pay_what_you_can.user_id
|
||||
WHERE amount > 0 AND rb_user.stripe_id IS NOT NULL;
|
||||
SELECT * FROM rb_payment
|
||||
INNER JOIN rb_user ON rb_user.id = rb_payment.user_id
|
||||
WHERE status = 'completed';
|
||||
|
||||
Python Pyramid Shell
|
||||
==============================================
|
||||
|
|
|
|||
|
|
@ -225,12 +225,12 @@ We should build a Remarkbox to matrix bridge. I bet it is a lot like working wit
|
|||
Sat Apr 3 10:40:05 PM EDT 2021
|
||||
=====================================
|
||||
|
||||
this is a useful SQL query to SELECT users who want to pay and also gave a credit card.
|
||||
this is a useful SQL query to SELECT users who have paid.
|
||||
|
||||
::
|
||||
SELECT * FROM rb_pay_what_you_can
|
||||
INNER JOIN rb_user ON rb_user.id = rb_pay_what_you_can.user_id
|
||||
WHERE amount > 0 and rb_user.stripe_id is not null;
|
||||
SELECT * FROM rb_payment
|
||||
INNER JOIN rb_user ON rb_user.id = rb_payment.user_id
|
||||
WHERE status = 'completed';
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -282,72 +282,6 @@ class AuthenticatedFunctionalTests(FunctionalTests):
|
|||
self.dbsession.refresh(namespace_request)
|
||||
self.assertTrue(namespace_request.verified)
|
||||
|
||||
## the only reason we need to patch is because of temporary operator email.
|
||||
#@patch("smtplib.SMTP")
|
||||
#def test_billing(self, mock_smtp):
|
||||
|
||||
# self._log_in_test_user(self.test_creds1)
|
||||
|
||||
# billing_response = self.testapp.post(
|
||||
# "/billing/add-card",
|
||||
# {
|
||||
# "email": "test@remarkbox.com",
|
||||
# "csrf_token": self.csrf,
|
||||
# "stripeToken": "tok_visa",
|
||||
# },
|
||||
# )
|
||||
|
||||
# self.dbsession.refresh(self.test_user1)
|
||||
# customer = stripe.Customer.retrieve(self.test_user1.stripe_id)
|
||||
# self.assertEqual(
|
||||
# customer.sources.retrieve(customer.default_source).brand, "Visa"
|
||||
# )
|
||||
|
||||
# self.testapp.post(
|
||||
# "/billing/add-card",
|
||||
# {
|
||||
# "email": "test@remarkbox.com",
|
||||
# "csrf_token": self.csrf,
|
||||
# "stripeToken": "tok_amex",
|
||||
# },
|
||||
# )
|
||||
|
||||
# for source in customer.sources.list():
|
||||
# if source.brand == "Visa":
|
||||
# visa = source
|
||||
# if source.brand == "American Express":
|
||||
# amex = source
|
||||
|
||||
# self.testapp.post(
|
||||
# "/billing/update-card",
|
||||
# {
|
||||
# "email": "test@remarkbox.com",
|
||||
# "csrf_token": self.csrf,
|
||||
# "action": "make-card-active",
|
||||
# "card_id": amex.id,
|
||||
# },
|
||||
# )
|
||||
|
||||
# customer = stripe.Customer.retrieve(self.test_user1.stripe_id)
|
||||
# self.assertEqual(
|
||||
# customer.sources.retrieve(customer.default_source).brand, "American Express"
|
||||
# )
|
||||
|
||||
# self.testapp.post(
|
||||
# "/billing/update-card",
|
||||
# {
|
||||
# "email": "test@remarkbox.com",
|
||||
# "csrf_token": self.csrf,
|
||||
# "action": "delete-card",
|
||||
# "card_id": amex.id,
|
||||
# },
|
||||
# )
|
||||
|
||||
# customer = stripe.Customer.retrieve(self.test_user1.stripe_id)
|
||||
# self.assertEqual(
|
||||
# customer.sources.retrieve(customer.default_source).brand, "Visa"
|
||||
# )
|
||||
|
||||
@patch("smtplib.SMTP")
|
||||
def test_notifications(self, mock_smtp):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue