Acceptance Criteria
Sanity - The activatinoactivation/desactivation deactivation of the QR code feature is associated with the service mode toggle. If, at least, one service mode is active, it means that the sub-fields for duration (botton bottom sheet in Home, recent order) must be mandatory filled. In addition, configurator needs to ensure that the list of eligible refill drinks (items) and store are properly set.
The QR code generation happens upon the order is placed with success or updated with success. No refunded order is considered for QR code generation.
QR code for scheduled orders must be displayed according to the order pick-up time.
The dispenser password is a secret that must be stored in the database. It will allow whitelabel to create a MD5 hash that is converted into the QR code. RBIberia needs to ensure that the configured secret in EMEA whitelabel is in sync with the vending machine password.
- Reviewed by Paula Winter
- Reviewed by Felipe Gonçalves
- Reviewed by Raphael Gomes
...
In the backend we will get the information, and we will get the secrets from DynamoDB, this these secrets is a key to generate an MD5 and with that we will generate a hash with MD5 encryption, and this hash will be returned to the whitelabel-app to use as QRCode.
...
Show Restaurant List with validate have one.
Show Items List with validate have one.
Just add items of “item” type
Validate messages and layout with designers
The comportment of these field is similar of the duration, stay occult, after activated one service mode, show these fields and are required.
Intl Whitelabel GraphQL
Task 1 - Create new function GetRefillDrinkQRCode for generate hash (Request Whitelabel implementation)
Add secrets in DynamoDB
Create a new provider into directory src/functions/graphql/providers/ RefillDrinkQRCodeProvider;
Create a request for get secrets of MD5
In this provider, we need to create a hash, this code is an example of how to create the logic for it.
Run
graphql:types
Create a new function for generated hash with MD5, but we need to get the key of cryptography of MD5;
Use the library
crypto
to create a hash with MD5, we have an example in src/functions/graphql/providers/users.tsCreate a new resolver into directory src/functions/graphql/resolvers/;
Create new types, interface, etc;
...
Create a new query in src/queries/rbi/ with parameters storeId, transactionId, transactionDatetime.
And the return must be a hash for of the QRCode
These parameters we can get of getOrder response.
...
create unit test
receive a hash code with sucesssuccess
Task 5 - Get and use QRCode of GetRefillDrinkQRCode (Request GraphQL implementation)
Get the response of GetRefillDrinkQRCode and return hash, use save this hash in Local Storage of our application for transform use in QRCode.