Skip to main content

Order

Overview

To place an order, you need to go to a product page. Product Meta

Checkout one product

To place an order you need to click on the Order button.

Checkout of several products at once

Add goods to Basket by clicking on the corresponding button. After adding all the items you are interested in, go to the Cart Page (the button is located in the header of the site).

Cart Page

To place an order you need to click on the Order button.

Stages of order creation

Creation, encryption, writing encryption key to the contract

When you first interact with Melcor, you will be prompted to create and encrypt an encryption key. Order Page Encryption Key

Creation is automatic, you just need to think of (and remember) a password and confirm the transaction.

Calling the create order function

After creating the encryption key, you need to confirm the checkout transaction. After confirmation, you will be redirected to the order page in messenger.

Depending on the messenger status, different information will be displayed. There are only 3 statuses:

  • starting
  • connecting
  • ready

If the messenger status is connecting, or if the number of active peers is 0, you will see the following screen. Order Page (Search Peers) If the messenger status is ready, you must enter a password to decrypt the encryption key.

Order Page (Offered) After entering the password, the order information will be available.

Order Page (Accepted)

This page displays all order information, including:

  1. Order ID;
  2. Order Status;
  3. Creation date;
  4. Date of last update;
  5. The escrow contract address;
  6. Seller's address;
  7. The address of the buyer;
  8. Guarantor's address.

After the order is accepted, you can get to this page by clicking on the chat name. The order status will change to ACCEPTED after the seller accepts the order.

Accepting an order also includes selecting a guarantor (if an escrow system with a guarantor is selected). At this stage, the seller generates symmetric encryption keys and encrypts them using the public encryption keys of the seller, buyer, and guarantor. Read more about Melcor Messaging.

Chat is now available to the seller, buyer and guarantor.

At this stage the seller and buyer discuss the terms of the order, if everyone is happy, the buyer pays for the item. Order Page (Paid) After payment, the buyer waits for the goods for an agreed period of time, if the goods are of proper quality, the buyer needs to leave feedback on the goods. If something went wrong, the buyer can open a dispute.

After leaving feedback, the order is considered completed. The tokens from the smart contract are sent to the seller's account.

Order Status

The order status determines the interaction methods. Available statuses are:

enum OrderStatuses {
OFFERED,
ACCEPTED,
PAID,
SHIPPED,
COMPLETED,
DISPUTE
}

Offered

The Offered status is set when an order is created. To change the status, the seller must accept an offer to purchase the item. Once the offer is accepted, the status will change to Accepted.

Accepted

The order status will change to Accepted after the contract function acceptOrder is executed.

The order status will change to Paid after the contract function depositOrder is executed.

Shipped

The order status will change to Shipped after the contract function deliveryOrder is executed.

Completed

The order status will change to Completed after the contract function confirmOrder is executed.

Dispute

The order status will change to Completed after the contract function dispute is executed.

Contract Functions