Remove redundant code

This commit is contained in:
PCoder 2018-07-05 09:55:45 +02:00
parent 9bf8992ff4
commit ec0216790f

View file

@ -311,17 +311,6 @@ class PaymentOrderView(FormView):
) )
request.session['card_id'] = user_card_detail.id request.session['card_id'] = user_card_detail.id
else: else:
# Get or create stripe customer
customer = StripeCustomer.get_or_create(
email=owner.email, token=token
)
if not customer:
msg = _("Invalid credit card")
messages.add_message(
self.request, messages.ERROR, msg,
extra_tags='make_charge_error')
return HttpResponseRedirect(
reverse('datacenterlight:payment') + '#payment_error')
request.session['token'] = token request.session['token'] = token
if request.user.is_authenticated(): if request.user.is_authenticated():
this_user = { this_user = {