Ejemplo n.º 1
0
            $gatewayMode = 'redirectUser';
            require_once BASE_PATH . "/assets/gateways/{$paymentType}/functions.php";
        } else {
            require_once BASE_PATH . "/assets/gateways/{$paymentType}/functions.php";
            $smarty->assign(array('banks' => $banks, 'email' => $_POST['email']));
            $smarty->display('cart.payment_mollieideal.tpl');
            exit;
        }
        break;
    default:
        if (file_exists(BASE_PATH . "/assets/gateways/{$paymentType}/functions.php")) {
            $gatewaySetting = getGatewayInfoFromDB($paymentType);
            // Get the gateway settings from the db
            require_once BASE_PATH . "/assets/gateways/{$paymentType}/functions.php";
            // Include the functions file for the gateway
            $gatewayForm = buildGatewayForm($formSubmitURL, $formData, $formSubmitMethod);
            // Get form data for use
            $submitSleep = 0;
        } else {
            die('Gateway functions file does not exist.');
        }
        // Make sure the gateway file exists before continuing
        break;
}
try {
    $smarty->assign('submitSleep', $submitSleep);
    // Time to delay the submit of the form
    $smarty->assign('gatewayForm', $gatewayForm);
    // pass gateway form details
    $smarty->display('cart.payment.tpl');
} catch (Exception $e) {
Ejemplo n.º 2
0
} else {
    $stepNumber = array('a' => 1, 'b' => 0, 'c' => 2, 'd' => 3);
}
// Get the stripe db details
$stripeResult = mysqli_query($db, "SELECT * FROM {$dbinfo[pre]}paymentgateways WHERE gateway = 'stripe' AND setting = 'pkey'");
if ($returnRows = mysqli_num_rows($stripeResult)) {
    $stripe = mysqli_fetch_assoc($stripeResult);
} else {
    echo "There is no public key set for your stripe account.";
    exit;
}
$gatewaySetting = getGatewayInfoFromDB($paymentType);
// Get the gateway settings from the db
require_once BASE_PATH . "/assets/gateways/{$paymentType}/functions.php";
// Include the functions file for the gateway
$gatewayForm = buildGatewayForm('stripe', $formData, $formSubmitMethod);
// Get form data for use
try {
    $smarty->assign('gatewayForm', $gatewayForm);
    // pass gateway form details
    $smarty->assign('invoiceItemsCount', $invoiceItemsCount);
    // Number
    $smarty->assign('digitalInvoiceItems', $digitalInvoiceItems);
    // Digital invoice items
    $smarty->assign('physicalInvoiceItems', $physicalInvoiceItems);
    // Physical invoice items
    $smarty->assign('stepNumber', $stepNumber);
    // Shipping address info
    $smarty->assign('shippingDetails', $shippingDetails);
    // Shipping address info
    $smarty->assign('shippingAddress', $_SESSION['shippingAddressSession']);