Remove unnecessary code

This commit is contained in:
PCoder 2018-06-12 11:15:17 +02:00
parent 6db38d7e29
commit fae9fce5c6

View file

@ -834,12 +834,6 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
).get_context_data(**kwargs) ).get_context_data(**kwargs)
obj = self.get_object() obj = self.get_object()
owner = self.request.user owner = self.request.user
stripe_api_cus_id = self.request.session.get('customer')
stripe_utils = StripeUtils()
card_details = stripe_utils.get_card_details(
stripe_api_cus_id,
self.request.session.get('token')
)
if self.request.GET.get('page') == 'payment': if self.request.GET.get('page') == 'payment':
context['page_header_text'] = _('Confirm Order') context['page_header_text'] = _('Confirm Order')
@ -912,10 +906,6 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
_('In order to create a VM, you need to create/upload ' _('In order to create a VM, you need to create/upload '
'your SSH KEY first.') 'your SSH KEY first.')
) )
elif not card_details.get('response_object'):
# new order, failed to get card details
context['failed_payment'] = True
context['card_details'] = card_details
else: else:
# new order, confirm payment # new order, confirm payment
if 'token' in self.request.session: if 'token' in self.request.session: