My merchant/payment gateway only supports php, asp, jsp and perl so I
am trying to convert a php script into ColdFusion but I am having a
hard time finding ColdFusion equivalents to some of the functions the
script uses.
Here are the functions and how they are used in the script:
str_pad()
USAGE:
ipad = str_pad("", 64, Asc(0x36)); // I converted chr() to Asc()
intval()
USAGE:
intval(i/20) // i is a counter/incremented in a for loop
pack()
USAGE:
function cybs_sha1($in) {
return pack ("H*", sha1 ($in));
}
list()
A = array(1732584193, 4023233417, 2562383102, 271733878, 3285377520);
list(a,b,c,d,e)=A;
defined()
I am asuming that defined() is deferent than ColdFusion's isDefined()
since the PHP manual says that defined() is for checking the existance
of a constant and isset() checks to see if a variable exists. I'm not
sure what the difference between a variable and a constant is, what's
a constant?
Also, I don't know what the following operators are:
^
<<
>>
and what do I use instead of
..=
The merhcants php script is a function library so I am just placing
everything into <cfscript>. I also attached the working file that I am
converting just in case it helps.
Thanks for your help,
Aaron
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259854
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4