File: example.php

Recommend this page to a friend!
  Classes of Angelo  >  sellaOTP  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Just one example
Class: sellaOTP
Interfacing via OTP for Sella Bank ecom. servers
Author: By
Last change:
Date: 18 years ago
Size: 3,643 bytes
 

Contents

Class file image Download
<?
/************************************************************************/
/* sella_OTP.class */
/* ======== */
/* */
/* Copyright (c) 2002 by Angelo Gelmi */
/* http://www.web3king.com/sellaOTP */
/* iwm@web3king.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
?><html>
<head>
<title>EXAMPLE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<td height="498">
  <DIV ALIGN="CENTER"> <br>
    <table border="0" width="640" cellspacing="0" cellpadding="0" class="corponove">
      <tr>
        <td valign="top"> <table border="0" width="97%" class="corponove" cellspacing="1" bgcolor="#000000">
            <tr bgcolor="#CCCCCC">
              <th bgcolor="#FF9900" class="corpootto">Shipping</th>
              <th bgcolor="#FF9900" class="corpootto">Shipping Amount</th>
              <th bgcolor="#FF9900" class="corpootto">Payment Method</th>
            </tr>
            <tr bgcolor="#E6F7FF">
              <td height="18" bgcolor="#ffffff"> <div align="center" class="corpootto">
                </div></td>
              <td align="right" height="18" bgcolor="#ffffff"> <div align="center" class="corpootto">
                </div></td>
              <td align="center" height="18" bgcolor="#ffffff"> <div align="center" class="corpootto">
                </div></td>
            </tr>
          </table>
          <br> <br> </td>
        <td width="150" rowspan="2" valign="top"> <table border="0" width="100%" class="corponove" cellspacing="1" bgcolor="#000000">
            <tr>
              <th width="100%" bgcolor="#FF9900">Tot. Order</th>
            </tr>
            <tr>
              <td width="100%" bgcolor="#e0e0e0" align="right"> <div align="center"><b>
                  <?
                  $totale_carrello
=15.30;
                      print
number_format($totale_carrello , "2", ",", ".");
       
?>
</b> </div></td>
            </tr>
          </table></td>
      </tr>
      <tr>
        <td valign="top"><form action="<? echo $PHP_SELF; ?>" method="post" name="form" id="form">
            <?
               
require "sella_OTP.class.php";
               
               
$amount=ereg_replace( ",", ".", $totale_carrello );
               
               
$transazione = new sella_OTP();
               
$transazione->SetUrl('');
               
$transazione->SetStore("file"); // option file or sql
               
$transazione->LING = 1; //optional if used you have to configure Sella Back END
               
$transazione->PAY1_AMOUNT = $amount ;
               
$transazione->PAY1_IDLANGUAGE = 1;
               
$transazione->PAY1_UICCODE = "242";
               
$transazione->PAY1_SHOPTRANSACTIONID ="123456789";// id session Your variable. MUST be different each time
               
               
$ret=$transazione->make_query("1234567"); //Merchant ID
               
               
if (!empty($transazione->error_log))
                    print
"Error: $transazione->error_log";
                else
                   
$transazione->show_form("get"); //options get or post
           
?>
</form></td>
      </tr>
    </table>
  </DIV>
</body>
</html>

For more information send a message to info at phpclasses dot org.