Exemplo n.º 1
0
    def list(self, request, *args, **kwargs):
        if not self.app:
            return Response("", status=400)

        client = get_client()
        res = client.api.bango.debug.get(
            data={"seller_product_bango": self.app.payment_account(PROVIDER_BANGO).account_uri}
        )
        filtered = {"bango": res["bango"]}
        return Response(filtered, status=200)
Exemplo n.º 2
0
    def list(self, request, *args, **kwargs):
        if not self.app:
            return Response('', status=400)

        client = get_client()
        res = client.api.bango.debug.get(
                data={'seller_product_bango':
                      self.app.app_payment_account.account_uri})
        filtered = {
            'bango': res['bango'],
        }
        return Response(filtered, status=200)
Exemplo n.º 3
0
    def list(self, request, *args, **kwargs):
        if not self.app:
            return Response('', status=400)

        client = get_client()
        res = client.api.bango.debug.get(data={
            'seller_product_bango':
            self.app.app_payment_account.account_uri
        })
        filtered = {
            'bango': res['bango'],
        }
        return Response(filtered, status=200)
Exemplo n.º 4
0
    def create(self, request, *args, **kwargs):
        """
        We aren't actually creating objects, but proxying them
        through to solitude.
        """
        if not self.app:
            return Response("", status=400)

        self.check_object_permissions(request, self.app)
        client = get_client()

        res = client.api.bango.status.post(
            data={"seller_product_bango": self.app.payment_account(PROVIDER_BANGO).account_uri}
        )

        filtered = {"bango": {"status": PAYMENT_STATUSES[res["status"]], "errors": ""}}
        return Response(filtered, status=200)
Exemplo n.º 5
0
    def create(self, request, *args, **kwargs):
        """
        We aren't actually creating objects, but proxying them
        through to solitude.
        """
        if not self.app:
            return Response('', status=400)

        self.check_object_permissions(request, self.app)
        client = get_client()

        res = client.api.bango.status.post(
                data={'seller_product_bango':
                      self.app.app_payment_account.account_uri})

        filtered = {
            'bango': {
                'status': PAYMENT_STATUSES[res['status']],
                'errors': ''
            },
        }
        return Response(filtered, status=200)
Exemplo n.º 6
0
    def create(self, request, *args, **kwargs):
        """
        We aren't actually creating objects, but proxying them
        through to solitude.
        """
        if not self.app:
            return Response('', status=400)

        self.check_object_permissions(request, self.app)
        client = get_client()

        res = client.api.bango.status.post(data={
            'seller_product_bango':
            self.app.app_payment_account.account_uri
        })

        filtered = {
            'bango': {
                'status': PAYMENT_STATUSES[res['status']],
                'errors': ''
            },
        }
        return Response(filtered, status=200)