コード例 #1
0
 def get_context_data(self, **kwargs):
     context = super(PGTransactionView, self).get_context_data(**kwargs)
     txnid = kwargs['txnid'].replace('/', '')
     context['txn'] = txn = self.get_txn(txnid)
     gateway = get_gateway_object('ccavenue')  # Later it could be dynamic.
     gateway.set_form_context(context, self.request, txn)
     return context
コード例 #2
0
ファイル: views.py プロジェクト: anandr31/lakshya-django
 def get_context_data(self, **kwargs):
     context = super(PGTransactionView, self).get_context_data(**kwargs)
     txnid = kwargs['txnid'].replace('/', '')
     context['txn'] = txn = self.get_txn(txnid)
     gateway = get_gateway_object('ccavenue')  # Later it could be dynamic.
     gateway.set_form_context(context, self.request, txn)
     return context
コード例 #3
0
 def post(self, request, *args, **kwargs):
     txn = PGTransaction.objects(
         request.site_id).get_or_none(txnid=request.POST.get('txnid', ''))
     if not txn:
         raise Http404
     gateway = get_gateway_object(txn.account)
     return gateway.process_server_post(request, txn)
コード例 #4
0
ファイル: views.py プロジェクト: anandr31/lakshya-django
 def post(self, request, *args, **kwargs):
     txn = PGTransaction.objects(request.site_id).get_or_none(txnid=request.POST.get('txnid', ''))
     if not txn:
         raise Http404
     gateway = get_gateway_object(txn.account)
     return gateway.process_server_post(request, txn)