I just wanted to share my findings on the hash option in the redirect URL, because it took me a while to find all the necessary information and put it together.
Here is some php code to check, if the url is valid or has been tampered with:
<?php
$hash=$_GET['hash'];
$url="http://".$SERVER["SERVERNAME"] . $SERVER["REQUESTURI"];
$url=str_replace ("&hash=".$hash, "", $url);
$md5passwd="the md5 sum of my password";
$clientid="my client id number, which I found in the seller admin > account summary menu";
$expected_hash=md5($clientid.$md5passwd.$url);
if ($expected_hash != $hash) { ?>
What was mostly unclear to me from the documentation was
1) what the client id is
2) which parts of the url are included in the hash (turns out, it were all of them :)
I hope this helps to save some elses time,
Brian
created
Sep '12
last reply
Jul '22
- 2
replies
- 1.3k
views
- 3
users