summaryrefslogtreecommitdiff
path: root/src/tests/test_pay_README
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2015-10-30 07:01:45 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2015-10-30 07:01:45 +0100
commitc8011ae1bd004575c5c11b0b30952cbbd8bbc983 (patch)
tree50203d986d25e4ef6501c8b58e44e4cee1fd00be /src/tests/test_pay_README
parent66bfaf5cd16bad25d87f65900b570d126bb6a5eb (diff)
downloadmerchant-c8011ae1bd004575c5c11b0b30952cbbd8bbc983.tar.gz
merchant-c8011ae1bd004575c5c11b0b30952cbbd8bbc983.tar.bz2
merchant-c8011ae1bd004575c5c11b0b30952cbbd8bbc983.zip
Adding further test instructions, fixing minor bugs
Diffstat (limited to 'src/tests/test_pay_README')
-rw-r--r--src/tests/test_pay_README26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tests/test_pay_README b/src/tests/test_pay_README
new file mode 100644
index 00000000..1704d6b7
--- /dev/null
+++ b/src/tests/test_pay_README
@@ -0,0 +1,26 @@
+The merchant's "/pay" facility can be tested either directly by querying the
+backend or by querying the frontend (which in turn will query the backend).
+Each file *.sample is sample JSON to POST to both components (with the '_backend'
+named version being dedicated to just the backend).
+
+Note: the sample 'deposit_permission_edate_backend.sample' contains the optional
+'edate' field to the deposit permission (that field indicates the tollerated delay
+by this merchant to receive funds relative to this payment)
+
+The frontend test admits two versions of queries, as in the following examples:
+
+ * curl -H 'Content-type: application/json' -d@deposit_permission.sample \
+ http://merchant-url/pay.php?cli_debug=yes
+
+ (this form tests the whole communication between frontend and backend)
+
+ * curl -d@deposit_permission.sample http://merchant-url/pay.php?backend_test=no
+
+ (this form tests only the deposit permission enhancement made by the
+ frontend, so it doesn't further connect to the backend to actually POST
+ that data. By default, the frontend doesn't add the 'edate' field, so it
+ is necessary to uncomment the related line of code to test this feature)
+
+Finally, to POST to the backend, issue
+ * curl -H 'Content-type: application/json' -d@*_backend.sample http://backend-url/pay
+