Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

Commit

Permalink
Merge pull request #624 from andymckay/926575
Browse files Browse the repository at this point in the history
actually pass the network used through to solitude (bug 926575)
  • Loading branch information
Andy McKay committed Apr 4, 2015
2 parents 9c07942 + e814df9 commit 0bcf9c5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/solitude/api.py
Expand Up @@ -592,8 +592,8 @@ def create_transaction(self, generic_buyer, generic_seller,
# In the case of Zippy, it does not detect any of these values
# itself. All other providers will detect these values without
# help from Webpay.
carrier = 'USA_TMOBILE'
region = '123'
carrier = 'FAKE'
region = 'CAN'
pay_method = 'OPERATOR'
# How do we decide what price to show? Normally Bango does this
# by deciding based on region detection. For our purposes, let's just
Expand Down
8 changes: 4 additions & 4 deletions lib/solitude/tests.py
Expand Up @@ -561,10 +561,10 @@ def test_start_with_existing_prod(self):

self.slumber.generic.transaction.post.assert_called_with({
'amount': '1.99',
'carrier': 'USA_TMOBILE',
'carrier': 'FAKE',
'currency': 'USD',
'provider': constants.PROVIDER_REFERENCE,
'region': '123',
'region': 'CAN',
'buyer': self.buyer_uri,
'seller': self.seller_uri,
'seller_product': self.product_uri,
Expand Down Expand Up @@ -634,10 +634,10 @@ def test_with_new_prod(self):
'Unexpected: {0}'.format(kw['error_url']))
self.slumber.generic.transaction.post.assert_called_with({
'amount': '1.99',
'carrier': 'USA_TMOBILE',
'carrier': 'FAKE',
'currency': 'USD',
'provider': constants.PROVIDER_REFERENCE,
'region': '123',
'region': 'CAN',
'buyer': self.buyer_uri,
'seller': self.seller_uri,
'seller_product': self.product_uri,
Expand Down
3 changes: 2 additions & 1 deletion webpay/bango/tests/test_views.py
Expand Up @@ -39,7 +39,8 @@ def call(self, overrides=None, expected_status=200,
'Price': '0.99',
'Currency': 'EUR',
'BangoTransactionId': '456',
'Token': '<bango-guid>'}
'Token': '<bango-guid>',
'Network': 'USA_TMOBILE'}
if overrides:
qs.update(overrides)
res = self.client.get(reverse(url), qs)
Expand Down
1 change: 1 addition & 0 deletions webpay/bango/views.py
Expand Up @@ -59,6 +59,7 @@ def _record(request):
'bango_token': qs.get('Token'),
'amount': qs.get('Price'),
'currency': qs.get('Currency'),
'network': qs.get('Network')
})
except HttpClientError, err:
log.error('Bango payment notice for transaction uuid %r '
Expand Down

0 comments on commit 0bcf9c5

Please sign in to comment.