billing: Integrate Stripe, using Stripe Checkout.

Stripe Checkout means using JS code provided by Stripe to handle
almost all of the UI, which is great for us.

There are more features we should add to this page and changes we
should make, but this gives us an MVP.

[greg: expanded commit message; fixed import ordering and some types.]
This commit is contained in:
Vishnu Ks
2018-01-13 18:38:13 +00:00
committed by Greg Price
parent a978336765
commit 0bca0286a1
5 changed files with 183 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ import os
import platform
import time
import sys
from typing import Optional
import configparser
from zerver.lib.db import TimeTrackingConnection
@@ -39,7 +40,7 @@ if PRODUCTION:
else:
secrets_file.read(os.path.join(DEPLOY_ROOT, "zproject/dev-secrets.conf"))
def get_secret(key: str) -> None:
def get_secret(key: str) -> Optional[str]:
if secrets_file.has_option('secrets', key):
return secrets_file.get('secrets', key)
return None