commit 0380bbaab8fd98735f980df160faec5b32782b59
parent 1a345ed83345c54631540f9f509129d048bdc33f
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Thu, 29 Oct 2015 23:13:37 +0100
adding edate to /pay handler in frontend
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/frontend/deposit.php b/src/frontend/deposit.php
@@ -28,17 +28,23 @@
$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);
$max_fee = array ('max_fee' => array ('value' => 3,
'fraction' => 01010,
'currency' => $currency));
-
$new_deposit_permission = array_merge ($deposit_permission, $max_fee);
+$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.
file_put_contents('/tmp/deposit_permission_maxfee.sample', json_encode($new_deposit_permission, JSON_PRETTY_PRINT));
+
return;
$req = new http\Client\Request ("GET",