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
My fix was to add this line before calling the
payment = paynow.create_payment('Testing', 'firstname.lastname@example.org')
# clearing the items list
response = paynow.send_mobile(payment, '0773416346', 'ecocash')
Here is the link to the Payment class.
I hope this helps