commit 0663d43e919963de6c30d8f1da3f31eddd433931
parent 6d7c1abd5fbf452b9e209237f3eb18ca54baccc4
Author: Florian Dold <florian.dold@gmail.com>
Date: Fri, 29 Jan 2016 11:37:37 +0100
changes due to #4159
Diffstat:
3 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/src/frontend/fulfillment.php b/src/frontend/fulfillment.php
@@ -77,6 +77,8 @@ $my_payment = get($payments[$hc]);
if (null === $my_payment)
{
echo "<p>you do not have the session state for this contract: " . $hc . "</p>";
+ echo "<p>Asking the wallet to re-execute it ... </p>";
+ echo "<script>executePayment('$hc', '$pay_url');</script>";
return;
}
diff --git a/src/frontend/generate_taler_contract.php b/src/frontend/generate_taler_contract.php
@@ -58,9 +58,10 @@ $contract = array(
'value' => $amount_value,
'fraction' => $amount_fraction,
'currency' => $currency),
- 'max_fee' => array('value' => 3,
- 'fraction' => 01010,
- 'currency' => $currency),
+ 'max_fee' => array(
+ 'value' => 3,
+ 'fraction' => 01010,
+ 'currency' => $currency),
'transaction_id' => $transaction_id,
'products' => array(
array(
diff --git a/src/frontend/pay.php b/src/frontend/pay.php
@@ -46,26 +46,8 @@ if (!isset($payments[$hc]))
$my_payment = &$payments[$hc];
$post_body = file_get_contents('php://input');
-
-$now = new DateTime('now');
-$edate = array (
- 'edate' =>
- "/Date(" . $now->add(new DateInterval('P2W'))->getTimestamp() . ")/");
-
$deposit_permission = json_decode ($post_body, true);
-$to_add = array(
- 'max_fee' => array(
- 'value' => 3,
- 'fraction' => 8,
- 'currency' => $_SESSION['currency']),
- 'amount' => array('value' => $_SESSION['amount_value'],
- 'fraction' => $_SESSION['amount_fraction'],
- 'currency' => $_SESSION['currency']));
-
-$new_deposit_permission = array_merge($deposit_permission, $to_add);
-$new_deposit_permission_edate = array_merge($new_deposit_permission, $edate);
-
/* Craft the HTTP request, note that the backend
could be on an entirely different machine if
desired. */
@@ -76,7 +58,7 @@ $url = url_rel("backend/pay");
$req = new http\Client\Request("POST",
$url,
array("Content-Type" => "application/json"));
-$req->getBody()->append (json_encode ($new_deposit_permission));
+$req->getBody()->append (json_encode ($deposit_permission));
// Execute the HTTP request
$client = new http\Client;