callback url get none http
This commit is contained in:
parent
5917dcbd85
commit
8b4b7e9e67
1 changed files with 5 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from django.contrib import messages
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.http import HttpResponseRedirect, HttpResponse
|
||||
from django.shortcuts import render
|
||||
from django.urls import reverse
|
||||
from django.utils.decorators import method_decorator
|
||||
|
|
@ -93,7 +93,10 @@ class ChargeConfirmView(UpdateView):
|
|||
# post = <QueryDict: {'Token': ['NDEwMTI0Nzc0MDMzMA=='], 'OrderId': ['7'], 'TerminalNo': ['31127029'], 'RRN': ['511629156251'], 'status': ['0'], 'TspToken': ['00000000-0000-0000-0000-000000000000'], 'HashCardNumber': ['6008617E6BAB76997499446356F5C8B60288445650DD551FDF32007BCF2B14AF'], 'Amount': ['21,000'], 'SwAmount': [''], 'STraceNo': ['123232']}>
|
||||
|
||||
if 'redirect-to-app' in request.POST:
|
||||
return super().post(request, *args, **kwargs)
|
||||
response = HttpResponse("", status=302)
|
||||
response['Location'] = self.object.callback_url
|
||||
return response
|
||||
|
||||
else:
|
||||
self.object = self.get_object()
|
||||
|
||||
|
|
@ -144,5 +147,3 @@ class ChargeConfirmView(UpdateView):
|
|||
#
|
||||
# return HttpResponseRedirect(self.get_success_url())
|
||||
|
||||
def get_success_url(self):
|
||||
return self.object.callback_url
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue