Paynow randomizing the total figure on payments


#1

I do not know whether there is a bad account configuration or not but something disturbing is happening with my transactions.

I have a system that runs polling. A client has to pay through selection of a plan. In the plan I select the cost through the plan that is selected as a total. The challenge is when a pop up comes sometimes it remembers the cancelled transactions for that ecocash account. Sometimes the ecocash pop ups come with randomized values. For Instance I just selected a US$1 plan for send_mobile and I am getting US$46 in the pop up. We have reported this issue before and there has been no solution

What might be causing this issue. Please help


#2

Good day kindly provide the following details.

The Paynow SDK you are using(if any).


#3

Python SDK. You helped me set up the code. Let me share my code
def generateZIGPaynowPayment(
amount: float,
paymentType: str,
mobileType: str,
walletNumber: str,
) -> dict:
“”"summary

Args:
    amount (float): description
    paymentType (str): description
    mobileType (str): description
    walletNumber (str): description

Returns:
    dict: description
"""

paynow = Paynow(
            2626262662,
            '988999999',
            'http://www.google.com/search?q=returnurl',
            'http://www.google.com/search?q=resulturl'
            )
paynowStatuses = [
    "disputed",
    "paid",
    "cancelled",
    "awaiting delivery",
    "delivered",
    "refunded"
]
payment = paynow.create_payment('user', 'info@mediazw.co.zw')
toPay = str(amount)
paymentId = generateId()
payment.add(paymentId, toPay)
response = paynow.send_mobile(payment, walletNumber, mobileType)
if response.success:
    return {
        'paymentId': paymentId,
        'pollUrl': response.poll_url,
    }
else:
    print('not doing..')
    return {
        'paymentId': paymentId,
        'pollUrl': None,
    }

Basically I need a pollUrl so that I can put it in a background task that does polling for me. But that happens after having initiated the payment which pops up those figures


#4

paymentId is just generated by str(uuid.uuid1()). Its just for my tracking


#5

Good day Menzi

Please note that this issue has been resolved, Update the SDK by running the command below

 pip install paynow --upgrade