From 761a76384f2f5b63939c9801720e667ab1afef53 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 21 Oct 2015 00:07:21 +0200 Subject: [PATCH] Closing #3955 --- website/fake_wire_transfer.php | 79 ++++++++ website/index.html | 14 +- website/style.css | 328 +++++++++++++++++++++++++++++++++ 3 files changed, 414 insertions(+), 7 deletions(-) create mode 100644 website/fake_wire_transfer.php create mode 100644 website/style.css diff --git a/website/fake_wire_transfer.php b/website/fake_wire_transfer.php new file mode 100644 index 000000000..a788a372e --- /dev/null +++ b/website/fake_wire_transfer.php @@ -0,0 +1,79 @@ + + + +Fake Wire Transfer + + + + + $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 gift shop and enjoy shopping!"; +} +?> + + diff --git a/website/index.html b/website/index.html index fc2f733c4..7d3207ac2 100644 --- a/website/index.html +++ b/website/index.html @@ -44,17 +44,14 @@ field.

- +

Paste your reserve public key here (right-click, "paste"): -
Amount to credit to your reserve: