Paynow Not Posting Results to Server


Is it just me or @paynow site runs into an error when transaction is cancelled and fails to post results to result_url.


Care to share more details ie how was the request generated and how/why it was cancelled. Could you provide enough details so I can attempt to replicate the error (Kind reminder dont provide integration keys I will use my own to test)


I am getting a similar error on development server upon confirming payment. … I notice the second forward slash is missing from the error path. The test payment is however successful since i recieve an email status message. the result url is printed coorectly on the console ie


Can you send a direct message with just your integration ID no keys please


Which Paynow SDK are you using ? You are sending an email address as your “return url” , the error is Paynow saying it cant find the ULR to redirect the user to


I am using python sdk. Not sure how paynow is picking up email when i have set return url and it is being printed correctly in the console


That is not an email address but a subdomain url. As extracted by paynow, it however doesnt include the port and this may be the source of the problem as i need to usethe port on the development server.The result_url printed to my console includes the port number



I am back with this error. The return url as depicted in the address bar on the image attached is correct. I receive emails from paynow for successful test payment but get the error depicted. If i strip the error url of everything which is paynow generated ie up just before http and try to return to my site it works which suggests there is nothing wrong with my implementation


When you make a request to Paynow you are sending your “resulturl” and “returnurl” with url encoding. Paynow does not url decode and what you send is read as is

For the “resulturl” Paynow will attempt to do an Http POST to the url provided an since its url encoded it will fail

For the “returnurl” Paynow will attempt to redirect using the link provided , since the url is encoded when Paynow attempts to parse it reads it as an internal reference triggering the error.

url encoded link

normal link


Hi @Gondayi , it seems @Harvey is right, the urls are encoded when payment is initiated. The problem is the SDK itself not @paynow server as the SDK was urlencoding all values. However, I have managed to come up with a solution for this and I have created a pull request for the fix. The PR is here

Redirecting User after payment

Thanks guys for the response. However, what I am using is not the official python sdk but the django example by charle k on github . Not sure if you can help with this.


That project depends on the official paynow python SDK so it is affected by this issue


Thanks guys for this. update url is working now. Just dealing with csrf induced failure on return url but all should be ok now


You switched to the branch mentioned in the PR?


Yes I did by editing the _init _ file to reflect your changes


Hi guys. My django example is working as far as updating the payment status. It does this through both the paynow_return function and the paynow_update function. However the user is never returned to the return url in the browser when the paynow_return function returns. It looks like both functions run at the same time and all i get is the httpresponse ok when the paynow_update function returns. Could the python sdk be causing this.


Please view this Pull Request

Still awaiting @paynow to merge the request


i understand. In the meantime I have manually edited my paynow installation as per you suggestion when encoding was happening. everything works fine except that there seems to be a race between the return url and update resulting in the user only being returned to the update url with ok status


did paynow merge yet?


It’s still open. I’m sure @paynow can give more information