foivz / pop-app-flutter

Mobile application for the course Entrepreneurial venture.
2 stars 0 forks source link

Implement buying product #11

Closed mislavmatijevic closed 1 year ago

mislavmatijevic commented 1 year ago

Application enables user logged in as a buyer to buy a selected product.

Buying is initiated when a user sends their username with a valid (already generated) invoice id.

Possible response status messages for endpoint "racuni.php" with fields Token, KorisnickoIme, CONFIRMSALEFROMCODE, Kod_Racuna: STATUSMESSAGE UI message
"INVOICE FINALIZED" show invoice details
"MISSING AMOUNT" "A product is out of stock!"
"MISSING BALANCE" "Not enough balance on your account!"
"NO BUYING FROM OWN STORE" "You can't buy from your own store!"
other "Invoice code is not valid!"

Acceptance Criteria

Condition Description
Given User is logged in as a buyer and on menu page
When User selects BUY option in the menu
Then A pop-up shows white text Choose payment method with options "QR Code" and "NFC".
When An option is selected
If QR code is selected Camera is activated and actively scanning for QRs.
If NFC is selected App displays text Touch the seller's device
If value read successfully App displays invoice specific information, as if the invoice was opened from the INVOICES list