[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Sending scratch variables to UserTags
****** message to minivend-users from "Mats Andersson" <Mats@brain.syh.fi> ******
<color><param>0100,0100,0100</param>I have a UserTag 'md5hash' that accepts a string and converts it to a MD5 hash
-------------
UserTag md5hash HasEndTag
UserTag md5hash Interpolate
UserTag md5hash Routine <<<<EOF
sub {
my $val = shift;
my $hash = MD5->hexhash($val);
return $hash;
}
EOF
-------------
If I send it a value like [md5hash]foo[/md5hash] I get a correct hash
returned.
Now this tag is needed to calculate a hash for online banking. I should feed
it a string like
<FontFamily><param>Times New Roman</param>0002&19&55&00042588INWX0000&LEHTI&
<FontFamily><param>Courier New</param>and get a hash to check against a hash calculated by the bank. This is to
check that payment was actually made.
The values sent from the bank is captured in scratch variables. I then build
an other scratch like
--------
[set name=check_hash interpolate=1]
[scratch VERSION]&[scratch STAMP]&[scratch REF]&[scratch PAID]&LEHTI&
[/set]
---------
This variable i need to send to the md5hash tag. I tried
[md5hash][scratch check_hash][/md5hash]
but this calculates the hash from the string "</color>[scratch check_hash]".
I need to send the value of the check_hash to the tag.
There must be some basic error in my tag or my thinking (probably both). I am
fairly new to both Perl and MiniVend.
Version is 3.14
Any help GREATLY appreciated.<color><param>0100,0100,0100</param>
<nofill>
- Mats
Soft Brains Ab Oy
0500-661356
Pie Iesu domine, dona eis requiem....[bonk]
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list