Django and Paynow integration (Help we are failing to get such integration)


#1

Django and Paynow integration (Help we are failing to get such integration)…the python code on the Paynow documentation is now working at all and producing errors

is there anyone who managed to integrate so share their code

from paynow import Paynow

paynow = Paynow(
‘INTEGRATION_ID’,
‘INTEGRATION_KEY’,
‘google url’,
‘google url’
)

payment = paynow.create_payment(‘Order’, ‘email’)

payment.add(‘Payment for stuff’, 1)

response = paynow.send_mobile(payment, ‘0777777777’, ‘ecocash’)

if(response.success):
poll_url = response.poll_url

print("Poll Url: ", poll_url)

status = paynow.check_transaction_status(poll_url)

time.sleep(30)

print("Payment Status: ", status.status)

this code is incomplete …it’s return nothing there must be some lines of code to be executed at the end of the code

paynow = Paynow(
‘INTEGRATION_ID’,
‘INTEGRATION_KEY’,
‘gogle url’,
‘google url’
)

then Paynow Team, you didn’t specify what goes on the 2 url links reprented by google url

then another issue there is no function l see where the transaction that will call the transaction on the mobile phone


#2

Good day Stanley

Apologies for the unclear instructions.

Please note that the first URL is the return URL and the second is the result URL

paynow = Paynow(
‘INTEGRATION_ID’,
‘INTEGRATION_KEY’,
‘return_url’,
‘result_url’
)

Please find complete guide for working with the Python SDK below