set the secondary receiver (mozilla) as the fee payer
This commit is contained in:
Родитель
0b0981f18a
Коммит
7f2877f5a0
|
@ -55,6 +55,8 @@ def add_receivers(chains, email, amount, uuid):
|
|||
# This is only done if there is a chained payment. Otherwise
|
||||
# it does not need to be set.
|
||||
'receiverList.receiver(0).primary': 'true',
|
||||
# Mozilla pays the fees, because we've got a special rate.
|
||||
'feesPayer': 'SECONDARYONLY'
|
||||
})
|
||||
result.update({
|
||||
'receiverList.receiver(0).email': email,
|
||||
|
|
|
@ -110,6 +110,15 @@ class TestPayKey(amo.tests.TestCase):
|
|||
eq_(_call.call_args[0][1]['receiverList.receiver(0).amount'], '10')
|
||||
eq_(_call.call_args[0][1]['receiverList.receiver(1).amount'], '1.34')
|
||||
|
||||
def test_primary_fees(self):
|
||||
res = paypal.add_receivers((), 'a@a.com', Decimal('1.99'), '123')
|
||||
assert 'feesPayer' not in res
|
||||
|
||||
def test_split_fees(self):
|
||||
chains = ((30, 'us@moz.com'),)
|
||||
res = paypal.add_receivers(chains, 'a@a.com', Decimal('1.99'), '123')
|
||||
eq_(res['feesPayer'], 'SECONDARYONLY')
|
||||
|
||||
|
||||
class TestPurchase(amo.tests.TestCase):
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче