Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use case: As a user I want to complete an order using the items on my basket #21

Open
juanfranblanco opened this issue Jan 31, 2020 · 0 comments
Labels
Milestone

Comments

@juanfranblanco
Copy link
Member

juanfranblanco commented Jan 31, 2020

  • Step 0 : The system will get the address nonce from the smart contract to create an id

  • Step 1 : The system will validate if user is authenticated (if not login.. process with redirect)

  • Step 2 : The system will confirm delivery address (and allow user to add address to their profile)

  • Step 2.1 The system will copy the address to the the basket to avoid issues on linking addresses and updates.

  • Step 3.1: Validation (Wonka) delivery rights, validate stock

  • Step 3.2: The system will calculate delivery cost (method) and taxes (Wonka)

  • Step 5: The system will display the user overall quote information

  • Step 6: User will confirm and submit order / quote to blockchain. (with quotation id, wonka rule id and eshop signature of request) An order is signed and confirmed by the system submitted to the smart contract (and smart contract validates and attaches the address to order). A quotation will have a expiry date, as this may not be submitted straight away. Notes: The order will not include user delivery postal address

Step submission:

  1. Quote (to submit to purchase order smart contract) gets created by the system and signed internally for verification
    Fields:

    • Quote Id: Generated by the system (to uniquely identify the quote and not allow the reuse of a quote when using the api)
    • Quote expiry date: For example 30 days, this is configured internally by the shop. Mandatory.
    • Line Items
    • Seller Id (decoupled from an external address or seller contract address as we may change the shops signature / reference address)
    • Buyer Address (this is the address of the customer in the system and to whom the quotation belongs to, billable address)
    • Receiver Address (this is the address that will be transferred ownership of the product (tokens)
    • R, S, V
  2. Order is submitted to Nethereum.UI to sign, submit the transaction (i.e Metamask)

  3. System waits for transaction hash to store.

  4. If submission fails the basket remains the same

  5. On transaction hash response (we don't know yet if mined) the hash is added to the basket (status not confirmed in chain)

  6. Back office service can start checking for hashes to validate if in chain and start fulfillment process using the quote number / nonce

@juanfranblanco juanfranblanco added this to the Phase 1 milestone Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant