Merge branch 'release/v15.30'
This commit is contained in:
@@ -53,9 +53,12 @@ from rowers.models import Rower,PaidPlan, CoachingGroup
|
|||||||
from rowers.utils import ProcessorCustomerError
|
from rowers.utils import ProcessorCustomerError
|
||||||
|
|
||||||
def webhook(request):
|
def webhook(request):
|
||||||
webhook_notification = gateway.webhook_notification.parse(
|
try:
|
||||||
str(request.POST['bt_signature']),
|
webhook_notification = gateway.webhook_notification.parse(
|
||||||
request.POST['bt_payload'])
|
str(request.POST['bt_signature']),
|
||||||
|
request.POST['bt_payload'])
|
||||||
|
except:
|
||||||
|
print(sys.exc_info())
|
||||||
|
|
||||||
# Example values for webhook notification properties
|
# Example values for webhook notification properties
|
||||||
print(webhook_notification.kind) # "subscription_went_past_due"
|
print(webhook_notification.kind) # "subscription_went_past_due"
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ from __future__ import unicode_literals
|
|||||||
from rowers.views.statements import *
|
from rowers.views.statements import *
|
||||||
|
|
||||||
def braintree_webhook_view(request):
|
def braintree_webhook_view(request):
|
||||||
braintreestuff.webhook(request)
|
if request.method == 'POST':
|
||||||
|
braintreestuff.webhook(request)
|
||||||
return JsonResponse(status=200)
|
return JsonResponse(status=200)
|
||||||
|
|
||||||
def paidplans_view(request):
|
def paidplans_view(request):
|
||||||
|
|||||||
Reference in New Issue
Block a user