From dc3d0f992037caae566a4a4cbfaa6602b17a0619 Mon Sep 17 00:00:00 2001 From: priscilla Date: Fri, 11 Nov 2022 07:18:19 -0500 Subject: QR code --- core/api-merchant.rst | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'core/api-merchant.rst') diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 6b654c05..31106dfc 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -2967,7 +2967,7 @@ Checking tip status ------------------ -Static QR code +QR code ------------------ This section describe how the static QR code will be define. @@ -2975,12 +2975,12 @@ The QR code will be used for the merchant who does not have electronics devices. The customers will be able to scan the QR code and will redirect to the payment page. -Create the static QR code +Create statics QR code ------------------ -.. http:post:: [/instances/$INSTANCE]/public/staticQRcode +.. http:post:: [/instances/$INSTANCE]/public/staticsQRcode - Create a static QR code. + Create statics QR code. If the merchant repeat, it will create another static QR code. This is generally without danger but merchant may want to eventually delete the unused static QR code to avoid clutter. @@ -2992,14 +2992,37 @@ Create the static QR code The QR code has been successfully created. :http:statuscode:`404 Not found`: - The merchant is unknown. + The merchant is unknown. So, we cannot create static QR code. :http:statuscode:`409 Conflict`: - A QR code already exists for this store. + A QR code already exists for this store. There will have a lot of QR code for one store. + + +Create dynamics QR code +------------------ + +.. http:post:: [/instances/$INSTANCE]/public/dynamicsQRcode + + Create dynamics QR code. + If the merchant repeat, it will create a real conflict. Dynamic QR code is unique + for every merchant. + + + **Response:** + + :http:statuscode:`200 Ok`: + The QR code has been successfully created. + + :http:statuscode:`404 Not found`: + The merchant is unknown. So, we cannot create dynamic QR code. + + :http:statuscode:`409 Conflict`: + A QR code already exists for this store. So, the creation of the QR code is impossible. + One store have just one dynamic QR code. -Scaning the static QR code +Scaning the QR code ------------------ .. http:get:: [/instances/$INSTANCE]/public/QRcode/$QRcode_ID -- cgit v1.2.3