forked from uncloud/uncloud
hackish way of registering works
This commit is contained in:
parent
df4c0c3060
commit
6efedcb381
5 changed files with 80 additions and 56 deletions
|
|
@ -7,17 +7,10 @@ from django.conf import settings
|
|||
|
||||
import uncloud_pay.models
|
||||
|
||||
# Static stripe configuration used below.
|
||||
CURRENCY = 'chf'
|
||||
|
||||
# README: We use the Payment Intent API as described on
|
||||
# https://stripe.com/docs/payments/save-and-reuse
|
||||
|
||||
# For internal use only.
|
||||
stripe.api_key = settings.STRIPE_KEY
|
||||
|
||||
# Helper (decorator) used to catch errors raised by stripe logic.
|
||||
# Catch errors that should not be displayed to the end user, raise again.
|
||||
def handle_stripe_error(f):
|
||||
def handle_problems(*args, **kwargs):
|
||||
response = {
|
||||
|
|
@ -61,8 +54,6 @@ def handle_stripe_error(f):
|
|||
|
||||
return handle_problems
|
||||
|
||||
# Actual Stripe logic.
|
||||
|
||||
def public_api_key():
|
||||
return settings.STRIPE_PUBLIC_KEY
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue