For generic payments, take users to invoice page after purchase

This commit is contained in:
PCoder 2020-12-23 20:40:20 +05:30
parent 6a7373523e
commit 968eaaf6a4

View file

@ -987,15 +987,18 @@ class OrderConfirmationView(DetailView, FormView):
'success': { 'success': {
'status': True, 'status': True,
'redirect': ( 'redirect': (
reverse('hosting:virtual_machines') reverse('hosting:invoices')
if request.user.is_authenticated() if request.user.is_authenticated()
else reverse('datacenterlight:index') else reverse('datacenterlight:index')
), ),
'msg_title': str(_('Thank you for the order.')), 'msg_title': str(_('Thank you for the order.')),
'msg_body': str( 'msg_body': str(
_('Your VM will be up and running in a few moments.' _('Your product will be provisioned as soon as'
' We will send you a confirmation email as soon as' ' we receive a payment confirmation from '
' it is ready.')) 'Stripe. We will send you a confirmation '
'email. You can always contact us at '
'support@datacenterlight.ch')
)
}, },
'error': { 'error': {
'status': False, 'status': False,