0

In order to calculate the checksum i need following things. these parameters are concatenated in a constant (no spaces) string made up of the values of the following parameters in the exact order listed below: o Secret Key o Merchant id o Currency o Total amount o Item list (item_name_1, Item_amount_1, item_quantity_1 to item_name_N, Item_amount_N, item_quantity_N) o Timestamp

e.g In that case the string befor hash will be: pLAZdfhdfdNh57583USD69.99Tier2 item69.9912010-06-14.14:34:33

And using the MD5 hash function the result is: ghvsaf764t3w784tbjkegbjhdbgf

i want to know how can i create a php script that will call md5 hash function with the inputs given above and based on that it will generate the hash function value that will be the checksum value for my coding..

1
  • 3
    EUhm, you've got it spelled out? The md5 function exists, go forth & use it. If you're stuck, you'd better follow some PHP tutorials first. Commented Jun 16, 2010 at 19:10

2 Answers 2

1

try

echo md5('pLAZdfhdfdNh57583USD69.99Tier2 item69.9912010-06-14.14:34:33');

That will do exacly what you asked. Unless you need help writting the whole script.

Sign up to request clarification or add additional context in comments.

Comments

0
$md5String = $element1 . $element2 . $element3; // ..etc 
$myMd5 = md5($md5String);

I dont know how each of your items come into play but thats basically the easiest way to do it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.