More info: [ic] routes + payment provider
Stefan Hornburg
racke@linuxia.de
28 Aug 2000 17:40:01 +0200
Mathias Picker <mathiasp@venus.virtual-earth.de> writes:
[...]
>
> # Execute vipclient
> my $vip = `$path command=response $message`;
>
Here you should check for errors.
> # Split returnvalue from vipclient
> my @array = split(' ', $vip);
> my ($tempid, $tempstatus);
> my $len = $#array;
>
> # Get OrderID and Status
> for (my $i = 0; $i <= $len; $i++) {
> if ($array[$i] =~ /orderID/) {
> my @array2 = split('=', $array[$i]);
> $tempid = $array2[1];
> }
> if ($array[$i] =~ /status/) {
> my @array2 = split('=', $array[$i]);
> $tempstatus = $array2[1];
> }
> }
>
> # closing and unlocking of old session
> Vend::Session::open_session();
> Vend::Session::read_session();
> Vend::Session::unlock_session();
> Vend::Session::close_session();
>
> # open file to get complete SessionName
> open(SESSION, "etc/$tempid") or
> die "can´t open file etc/$tempid\n";
> my $test = <SESSION>;
> $Vend::SessionName = $test;
> close SESSION;
>
> # delete file
> unlink("etc/$tempid") or
> die "can´t unlink file etc/$tempid\n";
Looks like an wild hack. There should be better way
to do this.
>
>
> # Open old Session
> Vend::Session::open_session();
> Vend::Session::read_session();
> unless($Vend::Session::File_sessions) {
> Vend::Session::lock_session();
> Vend::Session::close_session();
> }
>
> #Set Scratch-Variables after opening old Session
> $Vend::Session->{'scratch'}->{'status'} = $tempstatus;
> $Vend::Session->{'scratch'}->{'sessionid'} = $Vend::SessionName;
>
> if ($tempstatus = "success") {
Ouch. The operator eq comes into mind.
Ciao
Racke
--
LinuXia Systems && Cobolt NetServices, eCommerce and more
Shop- und Datenbanklösungen mit MiniVend, Firewalls auf Debian-Basis
http://www.linuxia.de - http://www.cobolt.net
--> Coding from hell and back <---