MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Can I use system() or open() in checkout_profile



******    message to minivend-users from "Gerard Olszowiec" <gerard@entitysoftware.com>     ******

Hi All:

I need to be able to run an external command/program and capture the results
during
the checkout process to get further authorization before the order can be
completed.  (Similar to a credit card authorization.)  I thought I could do
this with an open() sttement but I am not having any luck.  Here is an
edited version of what I have tried:

[set checkout_profile]
...
[perl values config]
...
open(AUTH, "goodstanding  |");
    $auth_results = <AUTH>;
close(AUTH);
$auth_ok = ($auth_results =~ /^APPROVED/);

$out = <<EOF;
&set = mv_auth_declined $auth_ok
EOF
return $out;
[/perl]

&fatal=yes
...
&final=yes
[/set]


In needfield.html I have:

elsif ($word =~ /auth_declined/i) {
return "<li>We could not authorize you order at this time.\n";

The open() statement should work and set the $auth_results to the single
line results, but no luck so far.  What is the proper procedure for grabbing
results from a program outside of Minivend?  Eternally grateful.

Cheers,
Gerard
------------------------------
Gerard Olszowiec
Entity Software
gerard@entitysoftware.com
www.entitysoftware.com


-
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


Search for: Match: Format: Sort by: