diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-10-29 23:13:37 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-10-29 23:13:37 +0100 |
commit | 0380bbaab8fd98735f980df160faec5b32782b59 (patch) | |
tree | 736775855d68987b83265bea14b25af69df01d24 | |
parent | 1a345ed83345c54631540f9f509129d048bdc33f (diff) | |
download | merchant-0380bbaab8fd98735f980df160faec5b32782b59.tar.gz merchant-0380bbaab8fd98735f980df160faec5b32782b59.tar.bz2 merchant-0380bbaab8fd98735f980df160faec5b32782b59.zip |
adding edate to /pay handler in frontend
-rw-r--r-- | src/frontend/deposit.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/frontend/deposit.php b/src/frontend/deposit.php index aabc456e..f2196cb9 100644 --- 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", |