[ic] payment module

Stefan Hornburg racke at linuxia.de
Mon Aug 11 22:50:57 EDT 2003

On Mon, 11 Aug 2003 20:59:08 +0200
"Chen Naor" <chen at lilux.co.il> wrote:

> Hello,
> I'm writing a custom payment module.
> I need to execute an external program, everything is running OK but I
> can't collect the answer.
> Here is an example:
> $cr_exec = "ls -la";
> open(ANSWER, "|$cr_exec")
>                         or die "error";
> my @cr_answer = <ANSWER>;
> close ANSWER;
> If I run it on a perl script it put in @cr_answer the result of the
> command. When I execute it in the Payment module it give no answer.
> I think I don't collect the right output, but I'm not sure.
> Any suggestions?

What about 

open (ANSWER, "$cr_exec |")

That appears to me more appropriate for getting the output of a
command. Or use:

$answer = `$cr_exec`;

Additionally, look at the payment modules shipped with Interchange.
There are ones calling executables as well.


LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

More information about the interchange-users mailing list