Esempio n. 1
0
} 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":
        //  if (MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET == 'True') {
        //    include_once ($curr_dir . '/googlecheckout/multisocket.php');
        //    process_merchant_calculation_callback($google_response, 2.7, false);
Esempio n. 2
0
    $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;
        //      }
        //    }
        //  case "merchant-calculation-callback-single" :