コード例 #1
0
function wc_AuthorizeInitialize()
{
    echo "</div><div id='containerTable'>";
    echo "<h1>wc_WPCommerce Authorize.NET Page";
    echo "</div>";
    if (wc_AuthorizeCardEntry()) {
        wc_AuthorizeCard($creditcard, $expiration, $total, $email, $product, $name);
    }
    echo "</div><div id='containerTable'>";
    wc_DisplayTestAuthorize();
    echo "</div>";
}
コード例 #2
0
<?php

/*
Template Name: Shopping Page
*/
get_header();
echo "<style>\n.Name {\n  font-size: 22px;\n\tcolor: black;\n\tline-height: 120%;\n}\n.NameCatalog {\n  font-size: 18px;\n\tcolor: grey;\n\tdisplay: inline;\n}\n.Price {\n  font-size: 14px;\n\tcolor: black;\n}\n.PriceRed {\n  font-size: 14px;\n\ttext-decoration: line-through;\n\tcolor: red;\n}\n.Description {\n  font-size: 16px;\n\tmin-height: 100px;\n\tpadding: 10px !important;\n\tcolor: black;\n}\n.wc-product {\n  background-color: #ffffff;\n  border: solid #000000 2px;\n  margin: 10px;\n  width: 600px;\n}\n#wc-product-part {\n\tmin-height: 60px;\n  padding: 5px;\n  border-bottom: solid #000000 1px;\n}\n#wc-product-partRight {\n  padding: 2px;\n  float: right;\n}\n#wc-product-partLeft {\n  padding: 2px;\n  float: left;\n}\n.Link {\n     background:none!important;\n     border:none;\n     padding:0!important;\n     color:#069;\n     text-decoration:underline;\n     cursor:pointer;\n\t\t font-size: 18px!important;\n\t \t color: grey;\n}\n </style>";
$currentProductAuthorize = $_POST['currentProductAuthorize'];
$submittedValue = $_POST['submittedValue'];
if (!empty($currentProductAuthorize)) {
    //Display Authorize.NET api functions.
    $currentPriceAuthorize = $_POST['currentPriceAuthorize'];
    wc_AuthorizeCardEntry();
    wc_DisplayMainAuthorize($currentProductAuthorize, $currentPriceAuthorize);
} else {
    //Display All Products
    wc_displayTemplateSelectionForm();
    wc_displayTemplateDropMenu();
    wc_decideTemplateCatalog();
    wc_displayTemplateProductSelection();
}
get_footer();
/**
 * Displays forms to Search for Products, and sort by id, price, name.
 * POST: search_text, rb_Selected(id,Price,Name)
 * @return void
 */
function wc_displayTemplateSelectionForm()
{
    ?>
      <form method ="post" action="">