Esempio n. 1
3
<?php

include 'tbcpay.lib.php';
$Payment = new tbcpay('https://securepay.ufc.ge:18443/ecomm2/MerchantHandler', __DIR__ . '/cert/tbcpay.pem', '0DhJ4AdxVuPZmz3F4y', $_SERVER['REMOTE_ADDR']);
if (isset($_REQUEST['trans_id'])) {
    $trans_id = $_REQUEST['trans_id'];
    $result = $Payment->get_transaction_result($trans_id);
}
?>


<html>
<head>
    <title>TBCPAY</title>
</head>

<body>
    <h2>Response:</h2>
    <p><?php 
print_r($result);
?>
</p>
</body>
</html>
Esempio n. 2
1
<?php

include 'tbcpay.lib.php';
$Payment = new tbcpay('https://securepay.ufc.ge:18443/ecomm2/MerchantHandler', __DIR__ . '/cert/tbcpay.pem', '0DhJ4AdxVuPZmz3F4y', $_SERVER['REMOTE_ADDR'], 1, 981, 'product_id:1234567', 'GE');
$start = $Payment->sms_start_transaction();
if (isset($start['TRANSACTION_ID']) and !isset($start['error'])) {
    $trans_id = $start['TRANSACTION_ID'];
}
?>


<html>
<head>
    <title>TBCPAY</title>
    <script type="text/javascript" language="javascript">
        function redirect() {
          document.returnform.submit();
        }
    </script>
</head>

<?php 
if (isset($start['error'])) {
    ?>

<body>
    <h2>Error:</h2>
    <h1><?php 
    echo $start['error'];
    ?>
</h1>