I found a “solution” I do not know if it is the right way to go about it but I realized that the incorrect payment amounts were multiples of the correct payment amount (i.e. correct payment amount * the number of times a like transaction has been made). Hence, 1000 the 1st time, 2000 the 2nd time, and so on, like it was charging for the current transaction and the previous ones. This is because they are being stored in the items
variable of the payment
object.
My fix was to add this line before calling the create_payment
method:
payment.items=[]
like this
payment = paynow.create_payment('Testing', 'test@example.com')
# clearing the items list
payment.items=[]
payment.add('Premium', 1000)
response = paynow.send_mobile(payment, '0773416346', 'ecocash')
Here is the link to the Payment class.
I hope this helps