Ejemplo n.º 1
0
    def get(self, request):
        alipay_success = AlipayUtils.verify_alipay_notify(request.REQUEST)

        if not alipay_success:
            return HttpResponse('fail')

        order_result = self.make_order_success()
        if order_result:
            return HttpResponse('success')

        return HttpResponse('fail')
Ejemplo n.º 2
0
    def get(self, request):
        alipay_success = AlipayUtils.verify_alipay_notify(request.REQUEST)

        order = self.make_order_success() if alipay_success else None
        user = self.request.user
        if VipRoleUtils.is_upgrade(user, order):
            self.template_name = 'vip_result.html'

        return render(request, self.template_name, {
            'order': order,
        })
Ejemplo n.º 3
0
    def get(self, request):
        alipay_success = AlipayUtils.verify_alipay_notify(request.REQUEST)

        if not alipay_success:
            return HttpResponse('fail')

        order_result = self.make_order_success()
        if order_result:
            return HttpResponse('success')

        return HttpResponse('fail')
Ejemplo n.º 4
0
    def get(self, request):
        alipay_success = AlipayUtils.verify_alipay_notify(request.REQUEST)

        order = self.make_order_success() if alipay_success else None
        user = self.request.user
        if VipRoleUtils.is_upgrade(user, order):
            self.template_name = 'vip_result.html'

        return render(
            request,
            self.template_name,
            {
                'order': order,
            }
        )
Ejemplo n.º 5
0
 def get(self, request):
     alipay_success = AlipayUtils.verify_alipay_notify(request.REQUEST)
     self.make_order_success() if alipay_success else None
     order_id = self.request.REQUEST.get('out_trade_no')
     extra_common_param = self.request.REQUEST.get('extra_common_param')
     order = OrderManage.get_order_info(
         order_id=order_id
     )
     return render(
         request,
         self.template_name,
         {
             'order': order,
             'extra_common_param': extra_common_param
         },
     )