Use the following data to unit test your hashing methods.


Initiating a Transaction Example

1. Example data: using this data as the values to be used when creating the hash for an initiate transaction request

resulturl = ‘http://localhost/sellingmilk.aspx?action=notify&order_id=2′
returnurl = ‘http://localhost/sellingmilk.aspx?action=return&order_id=2′
reference = ‘Order Number: #Mil140′
amount = 1
id = 1169
additionalinfo = ‘Some Info: milk tastes good.’
authemail = ”
status = ‘Message’

2. Concatenate

The above values concatenated should look like this:

http://localhost/sellingmilk.aspx?action=notify&order_id=2http://localhost/sellingmilk.aspx?action=return&order_id=2Order Number: #Mil14011169Some Info: milk tastes good.Message8c39c6ac-6c45-4cf5-a5b8-1955cc9d5e47

*This is the Order of concatenation:
resulturl + returnurl + reference + amount + id + additionalinfo + authemail + status + merchant_key as specified in the developer document

3. HASH it

If you properly implement YOUR method, you should get this simple hash value. Play around with your code until it gives the hash value below for the values given above, you will be good to go.



*You may need to just uppercase the hash value (using an uppercasing method such as “strtoupper” in PHP), its not necessarily automatic.

4. URL Encode

Now use a URLENCODE function to url encode your values like this. The message to send as a POST would be: