Example #1
0
    def data(self):
        if not self.processed:
            return

        if not self.transaction:
            log.info('No transaction.')

        return serialize_webhook(
            self.webhook, self.subscription, self.transaction)
Example #2
0
    def data(self):
        if not self.processed:
            return

        if not self.transaction:
            log.info('No transaction.')

        return serialize_webhook(self.webhook, self.subscription,
                                 self.transaction)
Example #3
0
 def test_cant_serialize(self):
     trans = Transaction.objects.create(provider=constants.PROVIDER_BANGO)
     with self.assertRaises(ValueError):
         serialize_webhook(None, self.braintree_sub, trans)
Example #4
0
 def test_cant_serialize(self):
     trans = Transaction.objects.create(provider=constants.PROVIDER_BANGO)
     with self.assertRaises(ValueError):
         serialize_webhook(None, self.braintree_sub, trans)