Ejemplo n.º 1
0
include_once 'includes/modules/payment/googlecheckout.php';
if (tep_session_is_registered('cart') && is_object($cart)) {
    $cart->restore_contents();
} else {
    $google_response->SendServerErrorStatus("Shopping cart not obtained from session.");
}
$google_checkout = new googlecheckout();
$google_response->SetMerchantAuthentication($google_checkout->merchantid, $google_checkout->merchantkey);
// Check if this is CGI-installed; if so .htaccess is needed.
$htaccess = gc_get_configuration_value($config->htaccessAuthMode()) == 'True';
if ($htaccess) {
    $google_response->HttpAuthentication();
}
switch ($root) {
    case "request-received":
        process_request_received_response($google_response);
        break;
    case "error":
        process_error_response($google_response);
        break;
    case "diagnosis":
        process_diagnosis_response($google_response);
        break;
    case "checkout-redirect":
        process_checkout_redirect($google_response);
        break;
        // TODO(eddavisson): Why are these commented out?
        // TODO(eddavisson): If we re-activate this, need to move to new configuration system.
    // TODO(eddavisson): Why are these commented out?
    // TODO(eddavisson): If we re-activate this, need to move to new configuration system.
    case "merchant-calculation-callback":
Ejemplo n.º 2
0
//  zen_session_start();
if (isset($_SESSION['cart']) && is_object($_SESSION['cart'])) {
    $cart = $_SESSION['cart'];
    $cart->restore_contents();
} else {
    $Gresponse->SendServerErrorStatus("Shopping cart not obtained from session.");
}
$googlepayment = new googlecheckout();
$Gresponse->SetMerchantAuthentication($googlepayment->merchantid, $googlepayment->merchantkey);
// Check if is CGI install, if so .htaccess is needed
if (MODULE_PAYMENT_GOOGLECHECKOUT_CGI != 'True') {
    $Gresponse->HttpAuthentication();
}
switch ($root) {
    case "request-received":
        process_request_received_response($Gresponse);
        break;
    case "error":
        process_error_response($Gresponse);
        break;
    case "diagnosis":
        process_diagnosis_response($Gresponse);
        break;
    case "checkout-redirect":
        process_checkout_redirect($Gresponse);
        break;
    case "merchant-calculation-callback":
        //      if (MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET == 'True') {
        //        include_once ($curr_dir . '/googlecheckout/multisocket.php');
        //        process_merchant_calculation_callback($Gresponse, 2.7, false);
        //        break;