Hello, I am using python3.9 and django 3.2. I added paynow library via pip. when I try to test with 0771111111 and auth email used to create the paynow account I am getting error called Error: <paynow.model.InitResponse object at 0x7f77fbe866a0>. Kindly help:
paynow = Paynow(
‘ID’,
‘KEY’,
‘https://example.co.zw’,
‘https://example.co.zw’
)
# Create new payment and pass in the reference and payer's email address
payment = paynow.create_payment('Order', 'auth_email')
# Passing in the name of the item and the price of the item
payment.add('Order', amount_to_pay)
# Save the response from paynow in a variable
response = paynow.send_mobile(payment, eco_num, 'ecocash')
print(response.status)
print(eco_num)
if response.success:
poll_url = response.poll_url
print("Poll Url: ", poll_url)
status = paynow.check_transaction_status(poll_url)
print("Payment Status: ", status.status)
return HttpResponse(200)