Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Disable transaction in billing config (bug 820198)

  • Loading branch information...
commit 8407aa6a5d1aa2710a9bd4bd39d9416f99b2933e 1 parent 854187f
@kumar303 kumar303 authored
View
9 lib/bango/resources/billing.py
@@ -20,6 +20,8 @@ def obj_create(self, bundle, request, **kwargs):
billing = client.client('billing')
data = form.bango_data
+ # Exclude transaction from Bango but send it to the signal later.
+ transaction_uuid = data.pop('transaction_uuid')
price_list = []
for item in form.cleaned_data['prices']:
price = billing.factory.create('Price')
@@ -48,5 +50,10 @@ def obj_create(self, bundle, request, **kwargs):
bundle.data = {'responseCode': resp.responseCode,
'responseMessage': resp.responseMessage,
'billingConfigurationId': resp.billingConfigurationId}
- create.send(sender=self, bundle=bundle, data=data, form=form)
+
+ # Uncomment this when bug 820198 lands.
+ # Until then, transactions are managed in webpay not solitude.
+ #create_data = data.copy()
+ #create_data['transaction_uuid'] = transaction_uuid
+ #create.send(sender=self, bundle=bundle, data=create_data, form=form)
return bundle
View
3  lib/bango/tests/test_resources.py
@@ -3,6 +3,7 @@
from django.conf import settings
import mock
+from nose.exc import SkipTest
from nose.tools import eq_, ok_
from lib.sellers.models import (Seller, SellerBango, SellerProduct,
@@ -289,6 +290,7 @@ def test_good(self):
assert 'billingConfigurationId' in json.loads(res.content)
def test_not_found(self):
+ raise SkipTest('signals disabled until bug 820198')
data = self.good()
self.transaction.provider = constants.SOURCE_PAYPAL
self.transaction.save()
@@ -296,6 +298,7 @@ def test_not_found(self):
self.client.post(self.list_url, data=data)
def test_changed(self):
+ raise SkipTest('signals disabled until bug 820198')
res = self.client.post(self.list_url, data=self.good())
eq_(res.status_code, 201)
transactions = Transaction.objects.all()
Please sign in to comment.
Something went wrong with that request. Please try again.