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
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)
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)