Curl request for Initiate Transaction


#1

I am working in rust and would like to build a service that utilises initiate transaction. I have tried to build a curl request based on the paynow example and I keep getting an error of a hash mismatch. Can someone help me build a valid request? What am I doing wrong here:

curl -i -X POST
-H “Accept:application/json”
-H “Content-Type:application/x-www-form-urlencoded”
-d “resulturl=http://www.google.com/search?q=resulturl”
-d “returnurl=http://www.google.com/search?q=returnurl”
-d “reference=TEST REF”
-d “amount=99.99”
-d “id=1201”
-d “additionalinfo=A test ticket transaction”
-d “status=Message”
-d “hash=2A033FC38798D913D42ECB786B9B19645ADEDBDE788862032F1BD82CF3B92DEF84F316385D5B40DBB35F1A4FD7D5BFE73835174136463CDD48C9366B0749C689”
https://www.paynow.co.zw/interface/initiatetransaction

Hash Generated with Info: https://developers.paynow.co.zw/docs/generating_hash.html

Error I am Getting:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.0
X-Frame-Options: SAMEORIGIN
Date: Fri, 29 Mar 2024 16:57:30 GMT
Content-Length: 66

status=Error&error=Invalid+Hash.++Hash+should+start+with%3a+E0947C%