[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] 2 Questions: I-Check and a Counter
Quoting Brian T. Allen (brian@purenetfx.com):
> ****** message to minivend-users from "Brian T. Allen" <brian@purenetfx.com> ******
>
> Hi All,
>
> I have 2 questions, both of which I can do in PERL and PHP, but I am not as
> well versed in minivend yet.
>
> 1) I want ot interface with I-Check (http://www.i-check.net, it is a great
> way to accept checks online. It costs $1.35 per check regardless of the
> cost, and you usually get it within 24 - 48 hours).
>
> What I can do is pass the session ID to I-Check in a URL, or a different
> unique number that points to a temp file on the hard drive that holds the
> persons information & order, and then they pass back an I-Check receipt
> number in a URL to me, normally to a cgi or php page.
>
> I am just unsure of how to temporarily store this information on my server,
> and how to get the receipt number and unique ID back from I-Check and
> process it. Does Minivend automatically assign variables passed in a GET or
> POST method like PHP does?
Autoload and the MV_SESSION_ID hack. If you have TolerateGet set,
and you define Variable MV_SESSION_ID, MiniVend will read the session
ID from that variable.
Variable MV_SESSION_ID icheck_session_id_variable
Autoload <<EOF
[perl arg="values cgi"]
# return quickly if not a check function
return '' unless if $Safe{cgi}->{icheck_session_id_variable};
my $cgi = $Safe{'cgi'};
my $val = $Safe{'values'};
# Whatever else you want to do
CODE: {
$val->{foo} = $cgi->{bar};
}
return '';
[/perl]
EOF
Beyond that I can't easily help because you didn't include any
pseudo-code. I can't easily compile the English language yet, one
of my failings....
>
> 2) This should be a little easier. I have working in both PERL and PHP a
> counter that is based on the URL of the page, and keeps a separate file for
> each unique URL. For instance www.mydomain.com/products/index.html would
> create a file in the counter directory named =products=index.html (/'s are
> replaced with ='s for file compatibility). If the file already exists it
> increments the number that is already in there. It works for products as
> well, so they can tell how many times each product is view and purchased,
> and see which products have the best conversion/sale rate.
>
> How can I do something like this with Minivend? I will need to be able to
> read and write files, and get the $ENV{DOCUMENT_URI} environment variable
> like in a CGI or PERL script.
>
The flycat.cfg file should contain a little UserTag called fcounter.
Modify appropriately, bearing in mind that it must go in minivend.cfg.
--
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
131 Willow Lane, Floor 2 | || _ \
It's a little-known fact Oxford, OH 45056 | || |_) |
that the Y1K problem caused <mikeh@minivend.com> |___| _ <
the Dark Ages. -- unknown 513.523.7621 FAX 7501 |_| \_\