Add logger messages
This commit is contained in:
parent
877553e442
commit
676a358832
1 changed files with 8 additions and 0 deletions
|
@ -709,11 +709,14 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
user = request.session.get('user')
|
user = request.session.get('user')
|
||||||
stripe_api_cus_id = request.session.get('customer')
|
stripe_api_cus_id = request.session.get('customer')
|
||||||
stripe_utils = StripeUtils()
|
stripe_utils = StripeUtils()
|
||||||
|
logger.debug("user=%s stripe_api_cus_id=%s" % (user, stripe_api_cus_id))
|
||||||
|
|
||||||
if 'token' in request.session:
|
if 'token' in request.session:
|
||||||
card_details = stripe_utils.get_cards_details_from_token(
|
card_details = stripe_utils.get_cards_details_from_token(
|
||||||
request.session.get('token')
|
request.session.get('token')
|
||||||
)
|
)
|
||||||
|
logger.debug(
|
||||||
|
"card_details=%s stripe_api_cus_id=%s" % (card_details))
|
||||||
if not card_details.get('response_object'):
|
if not card_details.get('response_object'):
|
||||||
msg = card_details.get('error')
|
msg = card_details.get('error')
|
||||||
messages.add_message(self.request, messages.ERROR, msg,
|
messages.add_message(self.request, messages.ERROR, msg,
|
||||||
|
@ -794,6 +797,7 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
'brand': user_card_detail.brand,
|
'brand': user_card_detail.brand,
|
||||||
'card_id': user_card_detail.card_id
|
'card_id': user_card_detail.card_id
|
||||||
}
|
}
|
||||||
|
logger.debug("card_details_dict=%s" % card_details_dict)
|
||||||
else:
|
else:
|
||||||
response = {
|
response = {
|
||||||
'status': False,
|
'status': False,
|
||||||
|
@ -811,6 +815,7 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
if ('generic_payment_type' in request.session and
|
if ('generic_payment_type' in request.session and
|
||||||
self.request.session['generic_payment_type'] == 'generic'):
|
self.request.session['generic_payment_type'] == 'generic'):
|
||||||
gp_details = self.request.session['generic_payment_details']
|
gp_details = self.request.session['generic_payment_details']
|
||||||
|
logger.debug("gp_details=%s" % gp_details)
|
||||||
if gp_details['recurring']:
|
if gp_details['recurring']:
|
||||||
# generic recurring payment
|
# generic recurring payment
|
||||||
logger.debug("Commencing a generic recurring payment")
|
logger.debug("Commencing a generic recurring payment")
|
||||||
|
@ -849,6 +854,8 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
if ('generic_payment_type' not in request.session or
|
if ('generic_payment_type' not in request.session or
|
||||||
(request.session['generic_payment_details']['recurring'])):
|
(request.session['generic_payment_details']['recurring'])):
|
||||||
recurring_interval = 'month'
|
recurring_interval = 'month'
|
||||||
|
logger.debug("'generic_payment_type' not in request.session or"
|
||||||
|
"(request.session['generic_payment_details']['recurring']")
|
||||||
if 'generic_payment_details' in request.session:
|
if 'generic_payment_details' in request.session:
|
||||||
vat_percent = request.session['generic_payment_details']['vat_rate']
|
vat_percent = request.session['generic_payment_details']['vat_rate']
|
||||||
vat_country = request.session['generic_payment_details']['vat_country']
|
vat_country = request.session['generic_payment_details']['vat_country']
|
||||||
|
@ -897,6 +904,7 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
app='dcl',
|
app='dcl',
|
||||||
price=amount_to_be_charged
|
price=amount_to_be_charged
|
||||||
)
|
)
|
||||||
|
logger.debug(specs)
|
||||||
stripe_plan = stripe_utils.get_or_create_stripe_plan(
|
stripe_plan = stripe_utils.get_or_create_stripe_plan(
|
||||||
amount=amount_to_be_charged,
|
amount=amount_to_be_charged,
|
||||||
name=plan_name,
|
name=plan_name,
|
||||||
|
|
Loading…
Reference in a new issue