merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit a2789c90b6cda2bcdb26e98c3f371e5937e632bc
parent d277c659ee126c2d46a5d9d48f3f411672fe5f71
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Thu, 29 Oct 2015 22:14:34 +0100

- moving pay URL indication *inside* the contract proposition
- adding fronthand handler for receiving payments

Diffstat:
Msrc/backend/taler-merchant-httpd.c | 2+-
Msrc/frontend/checkout.php | 4+---
Msrc/frontend/generate_taler_contract.php | 9+++++----
3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c @@ -445,7 +445,7 @@ run (void *cls, char *const *args, const char *cfgfile, &TMH_mint_currency_string)); EXITIF (GNUNET_SYSERR == - GNUNET_CONFIGURATION_get_value_string (config, + GNUNET_CONFIGURATION_get_value_time (config, "merchant", "EDATE", &edate)); diff --git a/src/frontend/checkout.php b/src/frontend/checkout.php @@ -76,9 +76,7 @@ pass it to the extension */ function handle_contract(json_contract) { - var cEvent = new CustomEvent('taler-contract', - { detail: json_contract, - target: "/taler/pay"}); + var cEvent = new CustomEvent('taler-contract', { detail: json_contract }); document.body.dispatchEvent(cEvent); }; diff --git a/src/frontend/generate_taler_contract.php b/src/frontend/generate_taler_contract.php @@ -66,7 +66,7 @@ else { $receiver = "Test Receiver"; $amount = 5; - $currency = "Test"; + $currency = "KUDOS"; } @@ -112,9 +112,10 @@ $json = json_encode (array ('amount' => array ('value' => $value, 'taxes' => array (array ('teatax' => $teatax)), 'delivery_date' => "Some Date Format", 'delivery_location' => 'LNAME1')), - 'timestamp' => "Date(" . $now->getTimestamp() . ")", - 'expiry' => "Date(" . $now->add(new DateInterval('P2W'))->getTimestamp() . ")", - 'refund_deadline' => "Date(" . $now->add(new DateInterval('P3M'))->getTimestamp() . ")", + 'timestamp' => "/Date(" . $now->getTimestamp() . ")/", + 'pay_url' => "/taler/pay", + 'expiry' => "/Date(" . $now->add(new DateInterval('P2W'))->getTimestamp() . ")/", + 'refund_deadline' => "/Date(" . $now->add(new DateInterval('P3M'))->getTimestamp() . ")/", 'merchant' => array ('address' => 'LNAME2', 'name' => 'test merchant', 'jurisdiction' => 'LNAME3'),