summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/frontend/fulfillment.php2
-rw-r--r--src/frontend/generate_taler_contract.php7
-rw-r--r--src/frontend/pay.php20
3 files changed, 7 insertions, 22 deletions
diff --git a/src/frontend/fulfillment.php b/src/frontend/fulfillment.php
index 45fe8dbc..bc5c54cb 100644
--- 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
index 229434ac..6b4694a3 100644
--- 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
index 508a83f4..e45c6891 100644
--- 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;