Exemplo n.º 1
0
$row = DB_fetchArray($res);
$T = new Template($_CONF['path'] . 'plugins/ecommerce/templates/payment_processor');
$T->set_file(array('cybersource' => 'cybersource.thtml', 'cart_content_row' => 'cart_content_row.thtml', 'user_credit_card_info_box' => '../user_credit_card_info_box.thtml'));
$total = draw_cart_contents($T);
$server_res = DB_query("SELECT ecom_payment_processor_live_server FROM {$_TABLES['ecom_payment_processor']} WHERE ecom_payment_processor_id = 1");
$server_row = DB_fetchArray($server_res);
$T->set_var('error', $_GET['error']);
if ($server_row['ecom_payment_processor_live_server']) {
    $T->set_var('action', 'https://orderpage.ic3.com/hop/CheckOrderData.do');
} else {
    $T->set_var('action', 'https://orderpagetest.ic3.com/hop/ProcessOrder.do');
}
#Signiture to Cybersource directly. total, currency, description.
$T->parse('output', 'cybersource');
echo $T->finish($T->get_var('output'));
InsertSignature3("{$total}", "usd", "sale");
$T->set_file(array('cybersource_credit_card' => 'cybersource_credit_card.thtml', 'cybersource_credit_card' => 'cybersource_credit_card.thtml', 'cybersource_post_insert' => 'cybersource_post_insert.thtml'));
//Descide which payment form to use Credit Card, or Bank Account.
if ($row['ecom_payment_form'] == "credit_card") {
    $current_card_id = draw_credit_card($row, &$T);
    if ($_SESSION['uid'] != 0) {
        $T->set_var('label', "Other Credit Cards");
        draw_other_credit_cards($current_card_id, $row['ecom_payment_type'], $T);
        $T->parse('cybersource_credit_card', 'cybersource_credit_card');
    }
} else {
    $current_bank_id = draw_check($row);
    $T->set_file('text', 'cybersource_other_payment_top.thtml');
    $T->set_var('label', "Additional Bank Accounts");
    echo $T->parse('output', 'text');
    draw_other_bank($current_bank_id, $row['ecom_payment_type']);
Exemplo n.º 2
0
" id="merchantDefinedData2">
		<input type="hidden" name="merchantDefinedData3" value="<?php 
        echo $token;
        ?>
" id="merchantDefinedData3">

      <?php 
    }
    ?>

	<?php 
    include_once 'HOP.php';
    ?>
	<?php 
    $totalAmount = $qtySensor5 * 5 + $qtySensor49 * 49 + $surcharge;
    ?>
	<?php 
    InsertSignature3($totalAmount, "usd", "sale");
    ?>
    

      <fieldset id="confirm" style="width:540px">
        <input type="button" value="&laquo; Edit Personal Information" class="button" id="edit-info" />
        <input type="submit" value="Submit your order &raquo;" class="button" />
      </fieldset>
    </form>
  
  </body>
  </html>  
<?php 
}