How do i add additional info like when you intergrating for a school lets say you want student names etc to be associated with the transactions as they make payments and also to have that information on your sight database or something like that


#1

How do i add additional info like when you intergrating for a school lets say you want student names etc to be associated with the transactions as they make payments and also to have that information on your sight database or something like that?


#2

Good day

Which language/Addon/SDK are you using. And Student information can be stored in your database and only send OrderId which is linked to your students table somehow in your db. If you want to send that info to Paynow still you can use the additionalInfo field as mentioned here https://developers.paynow.co.zw/docs/initiate_transaction.html


#3

im using Python so i thought mybe there was a way like where by they just add the phone number i only need users to add phone number so that when i get back the response from paynow i can store it as is or when i get the acknoledgement


#4

Are you using our SDK?

You can install our Python Package using the command below

pip install paynow

Please go through the docs here https://developers.paynow.co.zw/docs/python_quickstart.html, It should shed some light on what you are looking for.


#5

My question is more of how do i pass them to the paynow look below

def initiate_payment(request):

if request.method == ‘POST’:

payment = paynow.create_payment(‘subs’, ‘’)

payment.add(‘subs’, 10)

response = paynow.send(payment)

if response.success:

poll_url = response.poll_url

return redirect(response.redirect_url)

else:

return JsonResponse({‘success’: False, ‘message’: ‘Payment initiation failed’})

return render(request, ‘initiate.html’)


#6

im using the sdk i hav eactually manage to make a normal request is fine now my issue is to do wit additional information i wznt users to be able to enter their phone numbers when paying you sdks are sleeping on that they aint clear thats why i reached out its about additional let me see if i can get an example because it seems as if we ou of sync


#7

You want people to enter phone number when they are redirected to Paynow?


#8

not reaalyy i want them to enter even on my site such that the infor will be passed to Paynow because i want the numbers to be part of the transaction


#9

the end goal is we want to be able to distinguish who paid and who hasnt


#10

Okay, Do you expect to get it back from Paynow?

If you want it to be just Part of the Payment so you can later view it in Paynow, you can pass the phone number like this

    def initiate_payment(request):

if request.method == ‘POST’:

payment = paynow.create_payment(‘your_reference’, ‘your@email.com’)

payment.add(‘AdditionalInfo(StudentPhoneNumber)’, 10)

response = paynow.send(payment)

if response.success:

poll_url = response.poll_url

return redirect(response.redirect_url)

This way the number will be passed as additional info to paynow.


#11

hi now lets go about the result url so that i can receive the results n store them in my db