[ic] Credit Card Payement

Kyle Cook interchange-users@interchange.redhat.com
Thu Oct 18 18:52:01 2001


At 09:28 PM 10/18/01, you wrote:
>Help me, please !
>My bank gives me the below perl test code to connect my catalog with their 
>credit card control URL.
>On my system, the binary sips_request is in the directory /bin
>
>I have copied this code on a page to test, it generates the error :
>
>Safe : open trapped by operation mask (eval 677) line 35
>
>Where are the errors ?
>
>Thank you
>
>Daniel ROULLIERE
>
>Millau  FRANCE
>
>[perl]
>
>sub sips_payment_request   {
>
>my $path_bin = "/bin";
>
>
>return'
><B>SHERLOCKS - Paiement Sécurisé sur Internet</B><br>
><H1>Test du plug-in</H1><br>';
>
>
>
>
># initialisation des parametres dynamiques de la transactions
># si un parametre n'est pas valorise, on l'initialise a NULL
>my $merchant_id =  "014295303911111";
>my  $amount = "12500";
>my  $currency_code = "250";
>my $language = "fr";
>my  $return_context = "your_orderid";
>my  $receipt_complement = "NULL";
>my  $caddie = "NULL";
>my  $data = "NULL";
>
>    # load module sips_request
>
>my $sips_parm = "$merchant_id $amount $currency_code $language 
>$return_context $receipt_complement $caddie $data";
>return'$sips_parm';
>
>
>open(INFO,"$path_bin/sips_request $sips_parm|");

<snip>

Daniel,

Your perl block is attempting to open a file. It is being executed under 
Safe.pm which prohibits this
potentially unsecure action.

One way to get around this is to use a global Usertag :

Definition:
http://interchange.redhat.com/cgi-bin/ic/dev-4.8/icconfig_60.html


Specs:
http://interchange.redhat.com/cgi-bin/ic/dev-4.8/ictags_89.html



There are other ways, but not in embedded perl.

Kyle Cook