summaryrefslogtreecommitdiff
path: root/src/frontend/generate_taler_contract.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/generate_taler_contract.php')
-rw-r--r--src/frontend/generate_taler_contract.php63
1 files changed, 38 insertions, 25 deletions
diff --git a/src/frontend/generate_taler_contract.php b/src/frontend/generate_taler_contract.php
index 1030ae2a..33cb2a47 100644
--- a/src/frontend/generate_taler_contract.php
+++ b/src/frontend/generate_taler_contract.php
@@ -80,31 +80,44 @@ $json = json_encode (array ('amount' => array ('value' => $value,
'fraction' => 01010,
'currency' => $currency),
'trans_id' => $transaction_id,
- 'details' => array ( array ('product' =>
- array ('items' =>
- array ('description' => $desc,
- 'quantity' => 1,
- 'itemprice' => array ('value' => $value,
- 'fraction' => $fraction,
- 'currency' => $currency)),
- 'product_id' => $p_id,
- 'taxes' => array (array ('teatax' => $teatax)),
- 'delivery date' => "Some Date Format",
- 'delivery location' => 'LNAME1',
- 'merchant' => array ('address' => 'LNAME2',
- 'name' => 'test merchant',
- 'jurisdiction' =>
- array ('country' => 'Test Country',
- 'city' => 'Test City',
- 'state' => 'Test State',
- 'region' => 'Test Region',
- 'province' => 'Test Province',
- 'ZIP code' => 4908)),
- 'L-names' => array ('LNAME1' => 'Test Address 1',
- 'LNAME2' => 'Test Address 2'))))));//,
- //JSON_PRETTY_PRINT);
-
-if ($cli_debug && FALSE)
+ 'products' => array (
+ array ('description' => $desc,
+ 'quantity' => 1,
+ 'price' => array ('value' => $value,
+ 'fraction' => $fraction,
+ 'currency' => $currency),
+ 'product_id' => $p_id,
+ 'taxes' => array (array ('teatax' => $teatax)),
+ 'delivery_date' => "Some Date Format",
+ 'delivery_location' => 'LNAME1')),
+ 'merchant' => array ('address' => 'LNAME2',
+ 'name' => 'test merchant',
+ 'jurisdiction' => 'LNAME3'),
+
+ 'locations' => array ('LNAME1' => array ('country' => 'Test Country',
+ 'city' => 'Test City',
+ 'state' => 'Test State',
+ 'region' => 'Test Region',
+ 'province' => 'Test Province',
+ 'ZIP code' => 4908,
+ 'street' => 'test street',
+ 'street number' => 20),
+ 'LNAME2' => array ('country' => 'Test Country',
+ 'city' => 'Test City',
+ 'state' => 'Test State',
+ 'region' => 'Test Region',
+ 'province' => 'Test Province',
+ 'ZIP code' => 4908,
+ 'street' => 'test street',
+ 'street number' => 20),
+ 'LNAME3' => array ('country' => 'Test Country',
+ 'city' => 'Test City',
+ 'state' => 'Test State',
+ 'region' => 'Test Region',
+ 'province' => 'Test Province',
+ 'ZIP code' => 4908)))); //, JSON_PRETTY_PRINT);
+
+if ($cli_debug && TRUE)
{
echo $json . "\n";
exit;