Closing #3955
This commit is contained in:
parent
6e463d5c5c
commit
761a76384f
79
website/fake_wire_transfer.php
Normal file
79
website/fake_wire_transfer.php
Normal file
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Fake Wire Transfer</title>
|
||||
<script>
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this page.
|
||||
|
||||
Copyright (C) 2014,2015 GNUnet e.V.
|
||||
|
||||
The JavaScript code in this page is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
Lesser General Public License (GNU LGPL) as published by the Free Software
|
||||
Foundation, either version 2.1 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU LGPL for more details.
|
||||
|
||||
As additional permission under GNU LGPL version 2.1 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU LGPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this page.
|
||||
*/
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
This page's main aim is to forward the fake wire transfer
|
||||
request to the demonstrator and to inform the customer
|
||||
about the result. In a real-world deployment, this
|
||||
page would not be required as the customer would do a
|
||||
wire transfer with his bank instead.
|
||||
-->
|
||||
<?php
|
||||
|
||||
// Evaluate form
|
||||
$reserve_pk = $_POST['reserve_pk'];
|
||||
$kudos_amount = $_POST['kudos_amount'];
|
||||
$mint = $_SERVER['SERVER_NAME'];
|
||||
|
||||
// pack the JSON
|
||||
$json = json_encode (array ('reserve_pub' => $reserve_pk,
|
||||
'execution_date' => "/Date(" . time() . ")/",
|
||||
'wire' => array ('type' => 'test'),
|
||||
'amount' => array ('value' => intval($kudos_amount),
|
||||
'fraction' => 0,
|
||||
'currency' => 'KUDOS'))); // TODO 'KUDOS' example needs 'KUDOS' denom keys ..
|
||||
|
||||
// craft the HTTP request
|
||||
$req = new http\Client\Request ("POST",
|
||||
"http://" . $mint . "/admin/add/incoming",
|
||||
array ("Content-Type" => "application/json"));
|
||||
$req->getBody()->append ($json);
|
||||
|
||||
// execute HTTP request
|
||||
$client = new http\Client;
|
||||
$client->enqueue($req)->send ();
|
||||
$resp = $client->getResponse ();
|
||||
|
||||
// evaluate response
|
||||
$status_code = $resp->getResponseCode ();
|
||||
http_response_code ($status_code);
|
||||
|
||||
if ($status_code != 200)
|
||||
{
|
||||
echo "Error $status_code when faking the wire transfer. Please report to taler@gnu.org";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Pretend wire transfer successful. Exit through the <a href=\"http://toy.taler.net\">gift shop</a> and enjoy shopping!";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
@ -44,17 +44,14 @@
|
||||
field.
|
||||
</p>
|
||||
|
||||
<input id="wire-funds-button" type="button" value="Wire funds" disabled=true></input>
|
||||
<input id="wire-funds-button" type="button" value="Wire funds" disabled=true
|
||||
onclick='wire_funds();'></input>
|
||||
</div>
|
||||
<form id="reserve-form" name="tform" action="/fake_wire_transfer.php" method="POST">
|
||||
<div class="participation" id="fake-wire">
|
||||
<br>
|
||||
Paste your reserve public key here (right-click, "paste"):
|
||||
<input type="text" name="reserve_pk"></input>
|
||||
<select id="mint" name="mint_url">
|
||||
<option value="demo.taler.net">mint @taler.net</option>
|
||||
<option value="localmint">localmint (**)</option>
|
||||
</select>
|
||||
<br>
|
||||
Amount to credit to your reserve:
|
||||
<select id="amount" name="kudos_amount">
|
||||
@ -90,14 +87,17 @@
|
||||
|
||||
|
||||
|
||||
function wire_funds(){
|
||||
var trigger = new Event("taler-create-reserve");
|
||||
document.body.dispatchEvent(trigger);
|
||||
};
|
||||
|
||||
/* The mint signals itself to the wallet */
|
||||
function signal_me(){
|
||||
var eve = new Event('taler-wire-mfirst');
|
||||
document.body.dispatchEvent(eve);
|
||||
};
|
||||
|
||||
|
||||
|
||||
function has_taler_wallet_cb(){
|
||||
var button = document.getElementById("wire-funds-button");
|
||||
button.removeAttribute("disabled");
|
||||
|
328
website/style.css
Normal file
328
website/style.css
Normal file
@ -0,0 +1,328 @@
|
||||
/* css Zen Garden submission 020 - 'Friendly Beaches' by Sophie G - www.sophie-g.net */
|
||||
/* css released under Creative Commons ShareAlike License v1.0 - http://creativecommons.org/licenses/sa/1.0/ */
|
||||
/* All associated graphics copyright 2003, Sophie G */
|
||||
|
||||
|
||||
/* IMPORTANT */
|
||||
/* This design is not a template. You may not reproduce it elsewhere without the designer's written permission. */
|
||||
/* The CSS itself may freely be used for anything you wish, but the associated graphics belong to the designer. */
|
||||
/* What you may use - .css files. What you may not use - .jpg, .gif, and .png files. */
|
||||
|
||||
|
||||
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
margin: 0px;
|
||||
padding: 10px;
|
||||
font-family: Ubuntu, Tahoma, Sans;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 180%;
|
||||
}
|
||||
.page-wrapper {
|
||||
background-color: #EDEEF0;
|
||||
border: 1px solid #DAD5D9;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
abbr {
|
||||
border-bottom: 1px #6BA0D2 dashed;
|
||||
}
|
||||
header,h1 {
|
||||
font-family: Impact, Georgia, serif;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
header h1 {
|
||||
height: 190px;
|
||||
margin: 0px;
|
||||
background-color: black;
|
||||
background-image: url(Gala.jpg);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
header h1, header h2 {
|
||||
text-indent: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
header h2 {
|
||||
background-color: #EDEEF0;
|
||||
margin: 0px;
|
||||
height: 24px;
|
||||
padding: 0px 14px 2px 14px;
|
||||
background-image: url(headerh2.gif);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
header h2 abbr {
|
||||
color: #FFF;
|
||||
border-bottom: 1px #FFF dashed;
|
||||
}
|
||||
.summary p:first-child {
|
||||
position: absolute;
|
||||
right: 21px;
|
||||
top: 21px;
|
||||
width: 12em;
|
||||
height: 165px;
|
||||
padding: 3px 0 0 0;
|
||||
margin: 0px;
|
||||
border: 1px solid #0C2953;
|
||||
text-align: center;
|
||||
font-size: 90%;
|
||||
font-family: Impact, Georgia, serif;
|
||||
line-height: 110%;
|
||||
color: #FFF;
|
||||
background-image: url(summary.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 100%;
|
||||
background-color: #0C2953;
|
||||
}
|
||||
.preamble {
|
||||
padding: 0px 15em 0px 3em;
|
||||
}
|
||||
.preamble h3 {
|
||||
margin: 15px 0px 0px 0px;
|
||||
padding: 6px 20px 2px 6px;
|
||||
text-align: left;
|
||||
font-size: 180%;
|
||||
font-variant: small-caps;
|
||||
color: #6BA0D2;
|
||||
background-image: url(bordDroitPreambleh3.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 100% 0px;
|
||||
background-color: #F6F7F7;
|
||||
}
|
||||
.preamble h3::before {
|
||||
content: " ";
|
||||
display: inline-block;
|
||||
padding: 35px 0px 30px 48px;
|
||||
background-image: url(preambleShell.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0px 50%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.preamble p {
|
||||
text-align: justify;
|
||||
}
|
||||
.preamble p:nth-child(2), .preamble p:nth-child(3) {
|
||||
margin: 0px;
|
||||
padding: 10px 20px 2px 6px;
|
||||
background-image: url(bordDroitPreamble.gif);
|
||||
background-repeat: repeat-y;
|
||||
background-position: 100% 0px;
|
||||
background-color: #F6F7F7;
|
||||
}
|
||||
.preamble p:nth-child(4) {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-image: url(bordBasPreamble.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 100% 100%;
|
||||
background-color: #F6F7F7;
|
||||
padding: 10px 20px 20px 6px;
|
||||
}
|
||||
.preamble p:nth-child(4)::after {
|
||||
content: " ";
|
||||
display: block;
|
||||
margin: 0px;
|
||||
padding: 0 20px 0 6px;
|
||||
background-image: url(bordBasPreambleGauche.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0% 100%;
|
||||
}
|
||||
.supporting {
|
||||
margin: 0px;
|
||||
padding: 10px 16em 0px 1em;
|
||||
font-size: 90%;
|
||||
}
|
||||
.explanation, .participation, .benefits, .requirements {
|
||||
border: 2px solid #FFF;
|
||||
padding: 0px;
|
||||
}
|
||||
.explanation {
|
||||
margin: 0px 0px 10px 0px;
|
||||
}
|
||||
.participation {
|
||||
margin: 0px 0px 10px 0px;
|
||||
float: left;
|
||||
width: 30%;
|
||||
}
|
||||
.benefits {
|
||||
margin: 0px 0px 10px 32%;
|
||||
}
|
||||
.requirements {
|
||||
margin: 0px 0px 10px 32%;
|
||||
}
|
||||
.supporting h3 {
|
||||
margin: 0px;
|
||||
padding: 5px 30px 1px 2px;
|
||||
text-align: left;
|
||||
font-size: 120%;
|
||||
font-variant: small-caps;
|
||||
color: #6BA0D2;
|
||||
border-bottom: 1px solid #6BA0D2;
|
||||
background-color: #F6F7F7;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
.explanation h3 {
|
||||
background-image: url(explanationShell.jpg);
|
||||
}
|
||||
.supporting form {
|
||||
padding: 30px;
|
||||
display: inline-block;
|
||||
clear: both;
|
||||
width: 120em;
|
||||
}
|
||||
.supporting input {
|
||||
margin: 8px;
|
||||
}
|
||||
.participation h3 {
|
||||
background-image: url(participationShell.jpg);
|
||||
}
|
||||
.benefits h3 {
|
||||
background-image: url(benefitsShell.jpg);
|
||||
}
|
||||
.requirements h3 {
|
||||
background-image: url(requirementsRock.jpg);
|
||||
}
|
||||
.supporting p {
|
||||
text-align: justify;
|
||||
margin: 10px 0px 0px 0px;
|
||||
padding: 1px 3px 2px 3px;
|
||||
}
|
||||
.supporting a:link {
|
||||
color: #0083FF;
|
||||
font-weight: bold;
|
||||
}
|
||||
.supporting a:visited {
|
||||
color: #204160;
|
||||
font-weight: bold;
|
||||
}
|
||||
.supporting a:hover, .supporting a:active {
|
||||
color: #8C0000;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
.sidebar, .summary p:last-child {
|
||||
font-size: 90%;
|
||||
font-family: Impact, Georgia, serif;
|
||||
position: absolute;
|
||||
right: 21px;
|
||||
width: 12em;
|
||||
border: 1px solid #0C2953;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background-color: #A4ACB3;
|
||||
}
|
||||
.summary p:last-child {
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
top: 217px;
|
||||
font-size: 90%;
|
||||
display: block;
|
||||
padding: 3px 0;
|
||||
color: #FFF;
|
||||
}
|
||||
.sidebar {
|
||||
top: 266px;
|
||||
}
|
||||
.sidebar h3 {
|
||||
background-color: #0C2953;
|
||||
color: #FFF;
|
||||
margin: 0px;
|
||||
padding: 30px 1px 1px 1px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.sidebar h3.select {
|
||||
background-image: url(selecth3.jpg);
|
||||
background-position: 50% 0%;
|
||||
}
|
||||
.sidebar h3.favorites {
|
||||
border-top: 1px solid #0C2953;
|
||||
background-image: url(favoritesh3.jpg);
|
||||
background-position: 40% 100%;
|
||||
}
|
||||
.sidebar h3.archives {
|
||||
border-top: 1px solid #0C2953;
|
||||
background-image: url(archivesh3.jpg);
|
||||
background-position: 40% 100%;
|
||||
}
|
||||
.sidebar h3.resources {
|
||||
border-top: 1px solid #0C2953;
|
||||
background-image: url(resourcesh3.jpg);
|
||||
background-position: 50% 30%;
|
||||
}
|
||||
.sidebar ul {
|
||||
list-style-type: none;
|
||||
font-size: 90%;
|
||||
color: #FFF;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-color: #A4ACB3;
|
||||
}
|
||||
.sidebar li {
|
||||
padding: 3px 2px 3px 2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.sidebar li:hover {
|
||||
padding: 2px 1px 2px 1px;
|
||||
border: 1px dotted #0C2953;
|
||||
background-color: #6BA0D2;
|
||||
}
|
||||
.summary p:last-child a:link {
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
}
|
||||
.summary p:last-child a:visited {
|
||||
color: #204160;
|
||||
}
|
||||
.summary p:last-child a:hover, .summary p:last-child a:active {
|
||||
color: #FFD800;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
.sidebar a:link, .sidebar a:visited {
|
||||
border-left: 6px solid #FFF;
|
||||
padding-left: 2px;
|
||||
font-weight: bold;
|
||||
color: #FFF;
|
||||
}
|
||||
.sidebar a:visited {
|
||||
color: #204160;
|
||||
}
|
||||
.sidebar a:hover, .sidebar a:active {
|
||||
border-left: 6px solid #FFD800;
|
||||
padding-left: 2px;
|
||||
color: #FFD800;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
.sidebar a.designer-name:link, .sidebar a.designer-name:visited {
|
||||
border-left: none;
|
||||
padding-left: 0px;
|
||||
font-weight: normal;
|
||||
color: #FFF;
|
||||
}
|
||||
.sidebar a.designer-name:hover, .sidebar a.designer-name:active {
|
||||
border-left: none;
|
||||
padding-left: 0px;
|
||||
color: #FFD800;
|
||||
text-decoration: none;
|
||||
}
|
||||
.sidebar abbr {
|
||||
border-bottom: 1px #FFF dashed;
|
||||
}
|
||||
footer {
|
||||
clear: both;
|
||||
text-align: right;
|
||||
margin: 0px -16em 0px 0px;
|
||||
padding: 25px 0px 0px 0px;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(signSoph.gif);
|
||||
background-position: 0% 95%;
|
||||
}
|
||||
footer a {
|
||||
font-size: 70%;
|
||||
font-family: Impact, Georgia, serif;
|
||||
}
|
Loading…
Reference in New Issue
Block a user