systempayv2: amount unit is cents

This commit is contained in:
Benjamin Dauvergne 2012-05-29 17:43:51 +02:00
parent c072f3a4ab
commit 1c3d1e3a62
1 changed files with 2 additions and 0 deletions

View File

@ -256,6 +256,8 @@ class Payment(PaymentCommon):
'''
self.logger.debug('%s amount %s email %s next_url %s, kwargs: %s',
__name__, amount, email, next_url, kwargs)
# amount unit is cents
amount = 100 * amount
kwargs.update(add_vads({'amount': amount}))
if Decimal(kwargs[VADS_AMOUNT]) < 0:
raise ValueError('amount must be an integer >= 0')