Current File : /home/users/barii/public_html/finansenl.com.pl/mmagnesy.fotomagnesy.pl/p.php |
<?php
/**
* OpenPayU Examples
*
* @copyright Copyright (c) 2011-2016 PayU
* @license http://opensource.org/licenses/LGPL-3.0 Open Software License (LGPL 3.0)
* http://www.payu.com
* http://developers.payu.com
*/
require_once realpath(dirname(__FILE__)) . '/payu/lib/openpayu.php';
require_once realpath(dirname(__FILE__)) . '/payu/examples/config.php';
$order = array();
$order['notifyUrl'] = 'http://www.magnesy.fotomagnesy.pl/';
$order['continueUrl'] = 'http://www.magnesy.fotomagnesy.pl/koszyk.php?success';
$order['customerIp'] = '127.0.0.1';
$order['merchantPosId'] = OpenPayU_Configuration::getMerchantPosId();
$order['description'] = 'Zamówienie:';
$order['currencyCode'] = 'PLN';
$order['totalAmount'] = ($_GET['kwota']*100);
$order['extOrderId'] = uniqid('', true);
$order['products'][0]['name'] = $_GET['nazwa'];
$order['products'][0]['unitPrice'] = ($_GET['kwota']*100);
$order['products'][0]['quantity'] = 1;
$order['buyer']['email'] = $_GET['email'];
$order['buyer']['phone'] = $_GET['tel'];
$order['buyer']['firstName'] = $_GET['imie'];
$order['buyer']['lastName'] = '';
$order['buyer']['language'] = 'pl';
$rsp = OpenPayU_Order::hostedOrderForm($order);
$response = OpenPayU_Order::create($order);
header('Location:'.$response->getResponse()->redirectUri);
?>
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Generated Order Form - OpenPayU v2</title>
<link rel="stylesheet" href="../../layout/css/bootstrap.min.css">
<link rel="stylesheet" href="../../layout/css/style.css">
<style type="text/css">
#payu-payment-form button[type=submit]{
border: 0px;
height: 50px;
width: 290px;
background: url('http://static.payu.com/pl/standard/partners/buttons/payu_account_button_long_03.png') no-repeat;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Generated Order Form - OpenPayU v2.1</h1>
</div>
<div id="message"></div>
<div id="unregisteredCardData">
<pre>
<?php echo htmlentities($rsp); ?>
</pre>
<?php echo $rsp; ?>
</div>
</div>
</html>