From 3f56d1ec7095fa1139fef4fcfcd405c9965c7664 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 23 Jul 2019 19:11:43 +0200 Subject: [PATCH] card verification working --- rowers/braintreestuff.py | 6 +++--- rowers/templates/braintreedropin.html | 6 ++++-- rowers/templates/paymentconfirm.html | 5 +++++ rowers/templates/upgradeconfirm.html | 3 +++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/rowers/braintreestuff.py b/rowers/braintreestuff.py index 37cb67ac..9182a94d 100644 --- a/rowers/braintreestuff.py +++ b/rowers/braintreestuff.py @@ -103,7 +103,7 @@ def make_payment(rower,data): nonce_from_the_client = data['payment_method_nonce'] nonce = gateway.payment_method_nonce.find(nonce_from_the_client) info = nonce.three_d_secure_info - if info is None: + if info is None or not info.liability_shifted: return False,0 amount = data['amount'] @@ -138,7 +138,7 @@ def update_subscription(rower,data,method='up'): nonce_from_the_client = data['payment_method_nonce'] nonce = gateway.payment_method_nonce.find(nonce_from_the_client) info = nonce.three_d_secure_info - if info is None: + if info is None or not info.liability_shifted: return False,0 amount = data['amount'] amount = '{amount:.2f}'.format(amount=amount) @@ -240,7 +240,7 @@ def create_subscription(rower,data): nonce_from_the_client = data['payment_method_nonce'] nonce = gateway.payment_method_nonce.find(nonce_from_the_client) info = nonce.three_d_secure_info - if info is None: + if info is None or not info.liability_shifted: return False,0 amount = data['amount'] diff --git a/rowers/templates/braintreedropin.html b/rowers/templates/braintreedropin.html index ced74bbc..72b3af5b 100644 --- a/rowers/templates/braintreedropin.html +++ b/rowers/templates/braintreedropin.html @@ -3,6 +3,7 @@ diff --git a/rowers/templates/paymentconfirm.html b/rowers/templates/paymentconfirm.html index c76cd7f9..77785ed1 100644 --- a/rowers/templates/paymentconfirm.html +++ b/rowers/templates/paymentconfirm.html @@ -1,8 +1,13 @@ {% extends "newbase.html" %} {% block title %}Rowsandall Paid Membership{% endblock title %} {% load rowerfilters %} + + {% block main %} +
+
+

Confirm Your Payment

Order Overview

diff --git a/rowers/templates/upgradeconfirm.html b/rowers/templates/upgradeconfirm.html index b8896a5a..669c6b52 100644 --- a/rowers/templates/upgradeconfirm.html +++ b/rowers/templates/upgradeconfirm.html @@ -3,6 +3,9 @@ {% load rowerfilters %} {% block main %} +
+
+

Confirm Your Payment

Order Overview