<?php require 'conf.php'; $co = new Paydunya_Checkout_Invoice(); ?> <html> <head> <title>La boutique de Sandra</title> <style type="text/css"> body{ background-color: #272727; font-family: Arial; font-size: 14px; } h1{ font-weight: 500; } .container{ margin:60px auto 0 auto; width:600px; min-height: 400px; background-color: #fafafa; border: 1px solid #e4e4e4; padding: 15px 30px; } input[type="text"]{ padding:4px; display: block; width:300px; margin-bottom: 8px; }
function __construct() { parent::__construct(); }
<?php session_start(); require 'conf.php'; $co = new Paydunya_Checkout_Invoice(); $total_amount = 0; foreach ($_SESSION["cart"] as $product) { $co->addItem($product['name'], $product['quantity'], $product['unit_price'], $product['total_price']); $total_amount += $product['total_price']; } $co->setTotalAmount($total_amount); if ($co->create()) { header("Location: " . $co->getInvoiceUrl()); } else { echo $co->response_text; }