I'm writing a transaction layer for transfering funds via E-Gold and it is working fine except that I can't make the handshake hash come out right. It uses MD5 and I'm following the directions they use about which bits of data should be included in the MD5 hash and their order. Below is a snip from the code, does anyone see an error? If you'd like you can grab the rest of the code from http://phptoolbox.sourceforge.net/raw/ bu\y just grabbing all the egold* files (this is a temp dir with old files but these should be current until I fix this bug.)
function verify_handshake() {
global $PAYMENT_ID, $PAYEE_ACCOUNT, $PAYMENT_AMOUNT, $PAYMENT_UNITS, $PAYMENT_M
ETAL_ID, $PAYMENT_BATCH_NUM, $PAYER_ACCOUNT, $egold_pwd, $HANDSHAKE_HASH;
$md5_egold_pwd = md5($egold_pwd);
$md5_key = "$PAYMENT_ID$PAYEE_ACCOUNT$PAYMENT_AMOUNT$PAYMENT_UNITS$PAYMENT_META
$my_hash = md5($md5_key);
if(!($my_hash == $HANDSHAKE_HASH)) {
die ("Invalid handshake.");
}
}