0% found this document useful (0 votes)
77 views63 pages

Ethereum Blockchain Based E-Commerce System

Uploaded by

princehadepoju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views63 pages

Ethereum Blockchain Based E-Commerce System

Uploaded by

princehadepoju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

ETHEREUM BLOCKCHAIN BASED E-COMMERCE SYSTEM

BY

ALAMU ABDULLAHI OLADIMEJI - 032120229

IBUKUNTUNDE SIMON AYOOLUWAPELUMI - 032120205

PROPOSAL REPORT SUBMITTED TO THE DEPARTMENT OF COMPUTER

SCIENCE, SCHOOL OF SCIENCE AND ENGINEERING, HARVARDE COLLEGE OF

BUSINESS SCIENCE AND MANAGEMENT STUDIES ABEOKUTA, OGUN STATE

IN

PARTIAL FULFILMENT OF THE REQUIREMRNT FOR THE AWARD OF HIGHER

DIPLOMA IN COMPUTER SCIENCE

SEPTEMBER, 2022.
CERTIFICATION

This is to certify that this project work is written by

ALAMU ABDULLAHI OLADIMEJI (032120229)

And

IBUKUNTUNDE SIMON AYOOLUWAPELUMI (032120205), approved by the department of

computer science, HARVARDE COLLEGE OF SCIENCE BUSNESS AND MANAGEMENT

STUDIES, in partial fulfilment for the award of Higher Diploma in computer science.

______________________ __________________

Mr Akinwunmi O.O Date

Project Supervisor

______________________ _________________

Mr Akinwunmi O.O Date

Head of Department
DEDICATION

This work is dedicated to Almighty God, the creator of the heavens and the earth and all that dwell

therein.
ACKNOLEDGEMENT

We express our gratitude to Almighty God, the sovereign one.

Our supervisor, whose guidance and motivation has made this research a possibility and reality, for

his active cooperation, insightful feedback and encouragement every step of the way.

Also to our parents and guardian for the care and financial support all through the academic session.

Ultimately but not the least, to our lecturers, the legends of computer science who paved the way.

''If I have seen further, it is by standing on the shoulders of the giants'' ~ Isaac Newton.
ABSTRACT

Today, in the new economy, technology has brought about the e-economization giving rise to the use

of e-commerce for buying and selling activities over the internet. The e-commerce system has been

facing a lot of security issues over the years even earlier to its conception. The security of ecommerce

cannot be overlooked as it contains the confidential and private data of the parties involved, it is also

essential for gaining and maintaining the trust of customers and stakeholders (investors).

Many security standards have been established by various developer communities and organizations,

however, many of those standards are not promising. This paper will discuss how a decentralized

technology of ethereum blockchain can be used to improve the security.


TABLE OF CONTENTS

Title page ---------------------------------------------------------------------------------------------- i

Certification ------------------------------------------------------------------------------------------- ii

Dedication --------------------------------------------------------------------------------------------- iii

Acknowledgement ------------------------------------------------------------------------------------ iv

Abstract ------------------------------------------------------------------------------------------------- v

Table of Contents -------------------------------------------------------------------------------------- vi

CHAPTER ONE: INTRODUCTION

1.1 Background to the Study -------------------------------------------------------------------------- 1

1.2 Statement of the Problem ------------------------------------------------------------------------- 8

1.3 Aims and Objective of the Study ----------------------------------------------------------------- 8

1.4 Significance of the Study -------------------------------------------------------------------------- 9

1.5 Scope of the Study ---------------------------------------------------------------------------------- 9

1.6 Limitations to the Study ---------------------------------------------------------------------------- 9

1.7 Definition of Terms -------------------------------------------------------------------------------- 10

CHAPTER TWO: LIITERATURE REVIEW

2.1 Related Works on Ethereum Blockchain based E-commerce System ------------------- 11

2.2 Overview of existing ecommerce system ---------------------------------------------------- 15

2.3 Concept of existing ecommerce system security -------------------------------------------- 17

CHAPTER THREE: SYSTEM ANALYSIS AND DESIGN


3.1 System Design ------------------------------------------------------------------------------------ 19

3.2 Analysis of the Existing System ---------------------------------------------------------------- 19

3.3 Justification of the New System ---------------------------------------------------------------- 21

3.4 Software development model ------------------------------------------------------------------- 22

3.5 System Design ------------------------------------------------------------------------------------ 25

3.6 Software/Hardware Requirements -------------------------------------------------------------- 27

3.7 Technological Overview ------------------------------------------------------------------------- 28

CHAPTER FOUR: SYSTEM IMPLEMENTATION AND MAINTENANCE

4.1 User Interface -------------------------------------------------------------------------------------- 30

4.2 Database -------------------------------------------------------------------------------------------- 35

4.3 System Maintenance ------------------------------------------------------------------------------- 36

CHAPTER FIVE: SUMMARY, CONCLUSION AND RECOMMENDATIONS

5.1 Summary -------------------------------------------------------------------------------------------- 37

5.2 Conclusion ------------------------------------------------------------------------------------------ 37

5.3 Recommendations ---------------------------------------------------------------------------------- 38

References ----------------------------------------------------------------------------------------------- 39

Appendixes ----------------------------------------------------------------------------------------------- 40
CHAPTER ONE

INTRODUCTION

1.1 Background to the study

According to Stella C. Chiemeke and Franca A. Egbokdara (2006), a system is a set of Components

that interacts to achieve a common goal. In another sense, a system is an interrelated set of units that

forms a unified whole.

E-commerce system is an online platform for buying and selling of goods and commodities.

Investopedia (2022) defines e-commerce as “A business model that allows companies and

individuals to buy and sell goods and services over the Internet”. Ecommerce operates in four major

market segments and can be conducted over computers, tablets, smartphones, and other smart

devices. Nearly every imaginable product and service is available through ecommerce transactions,

including books, music, plane tickets, and financial services such as stock investing and online

banking.

There are many online payment modes in e-commerce such as credit/debit payment, direct debit

payment, electronic funds transfer payment, electronic wallet payment, smart cards, cryptocurrency

payments.

o Ecommerce is the buying and selling of goods and services over the Internet.

o It is conducted over computers, tablets, smartphones, and other smart devices.

o Almost anything can be purchased through ecommerce today.

o It can be a substitute for brick-and-mortar stores, though some businesses choose to

maintain both.

o Ecommerce operates in four market segments, including business-to-business,

business-to-consumer, consumer-to-consumer, and consumer-to-business.


E-commerce utilizes secured websites for their web payments and financial transactions. However,

cryptocurrency has brought a revolution in commercial and financial transactions. Blockchain is the

technology where transactions are made through decentralized currency with no central

intermediaries like bank and authority (third party). The most promising factor is the tracking system

and the process of publicly available immutable transaction record. Blockchain technology is a

distributed ledger for various economic and financial transactions that performs series of calculations

via the implemented algorithms and some techniques of cryptography which enables a secure way

for e-commerce.

The virtual world of internet has become necessary in our daily life, the need of online services is

increasing and growing in vast rate. The computerized world has brought a significant effect on the

global e-commerce system platform. Online business platforms bring convenience and flexibility

from different stores for a wide range of network users (Balaji N, 2019). For instance, the registration

and transaction process can be also completed easily through the online platform. Due to this reason,

cyber attacks grow at an unexpected rate all over the world. Therefore, the security of network

architecture became the biggest threat and concern to the future of ecommerce platforms (Richard

Apau et al., 2019). The data of an organization and customer trust are the key to success for the

development cycle of an organization. Data is important for organizations in controlling and

managing the organization and also contributes to the decision-making process (L. Steve, 2019).

Based on this, data should only allow access to the stakeholders and management teams to ensure

the data privacy and compliance of the organizations and customers meanwhile maintaining

customers' Trust and loyalty. Therefore, it is essential to utilize reliable tools and technologies for

protecting this asset from unauthorized access (P. Kale, 2019). The tool and technology selected for

the E-commerce business platform is the ethereum blockchain technology and the blockchain

technology will be applied as their repository of transactions and data records. The concepts of the

digital cryptocurrency called ethereum was conceived in 2013 by programmer Vitalik Buterin. The

technology behind the ethereum blockchain is decentralized and encrypted the data details had
ensured the data integrity and data accountability. Due to this, the technology is getting popularity

and adoption in many industries. It records and encrypts the data in a chain of back-linked blocks of

information and creates a distributed database that is unalterable for unauthorized access (Wang,

2020). Smart contracts also became one of the prominent features of Blockchain. It is a self-

enforcing agreement between two or more parties, used to manage the access rights to the nodes that

store data. (Voshmgir, 2020; Alam Khan et al., 2020). Based on the characteristics mentioned,

blockchain technology can be implemented into databases of the e-commerce system of business. It

can be used to store values like money and contracts (Alex and Don, 2020). Besides, the blockchain

concept in e-commerce platforms might improve supply chain management and transactional

operations as well as provide transparency of the data management and minimize transaction costs

(Sharma, 2020; Saakian, 2020). Most importantly, it can provide a secured environment for e-

commerce platforms’ users and make them trust the organizations. The unique structure of the

Blockchain network enables increased level of security in the database systems and ensures high

protection from cyber-attacks. The chained data structure of blockchain is used for data verification

and data storage, meanwhile, the process of data updating and data generation requires the

mechanism of distributed nodes applied in the blockchain. The cyber-attackers or hackers need to

break down all the nodes on the server, which is virtually impossible. Therefore, this research

proposes a blockchain-based database system for e-commerce, to establish exceptional data security

of the organization.

BLOCKCHAIN TECHNOLOGY

Blockchain is a system of recording information in a way that makes it difficult or impossible to

change, hack, or cheat the system. A blockchain is essentially a digital ledger of transactions that is

duplicated and distributed across the entire network of computer systems on the blockchain.

Blockchain technology is a structure that stores transactional records, also known as the block, of the
public in several databases, known as the “chain,” in a network connected through peer-to-peer nodes.

Typically, this storage is referred to as a ‘digital ledger.’ Every transaction in this ledger is authorized

by the digital signature of the owner, which authenticates the transaction and safeguards it from

tampering. Hence, the information the digital ledger contains is highly secure.

In simpler words, the digital ledger is like a Google spreadsheet shared among numerous computers

in a network, in which, the transactional records are stored based on actual purchases. The fascinating

angle is that anybody can see the data, but they can’t corrupt it.

ETHEREUM BLOCKCHAIN

Ethereum blockchain is a decentralized, open-source blockchain with Smart contract functionality.

Ether is the native cryptocurrency of the platform. Among crypto-currencies, Ether is second only to

Bitcoin in market capitalization. Ethereum was conceived in 2013 by programmer Vitalik Buterin.

Ethereum is the second largest crypto-currency by market-cap and has extensive documentation and

an active developer community. Thousands of decentralized applications have already been built on

this network.

Ethereum provides the developers the ability to use certain libraries and frameworks that the

developer can use to process events that triggers, these events are then interpreted by the Ethereum

web3.js provider and used to manipulate webpage. Users interact with the Ethereum network through

a web3 provider that is able to interface with an Ethereum wallet. A user with a web3 provider such

as metamask on their browser can interact with the application this enables programming on the

Blockchain a realistic task.

There are notable limitations and shortcomings encountered in choosing the Ethereum blockchain

technology which are as follows:

1. Low Throughput
2. Poor user experience (ux): Gas, delayed Pow finality.

3. No sovereignty: Shared Throughput /clogging risk, tech stack, not customizable, governance

dependence.

A remedial measure devised to overcome the limitation is the introduction of polygon framework et

protocol into the development.

POLYGON TECHNOLOGY

Polygon is the framework and protocol for building Ethereum-compatible blockchain network,

Polygon feature a set of sovereign blockchain and a best of Ethereum component built by developers

and for the developer use

The features are as follows in sequential manner:

1. Ethereum compatibility:

 Industry dominance

 established tech stack

 Tools

 languages

 standards

 Enterprise adoption

2. Scalability:

 Dedicated blockchain

 Scalable consensus algorithm

 Custom wasm execution environment


3. security:

 Modular “security as service”; provided either by Ethereum or by a pool of professional

validators.

4. Sovereignty:

 Dedicated throughput/resources

 Fully customizable tech stacks

 Sovereign governance

5. Interoperability:

 Native support for arbitrary message passing (tokens, contact, calls etc.)

 Bridges to external systems

6. User Experience (UX):

 Comparable to web2

 zero gas transaction

 instant deterministic transaction finality

7. Developer Experience (dev.X):

 Equivalent to Ethereum

 no protocol level knowledge required

 no token deposits

 fees or permission

8. Modularity:
 High customizability, extensibility and upgradability

 Short time-to-market

 Community collaboration
1.2 STATEMENT OF PROBLEM

Corporations and business organizations are seeking outstanding and proficient ways to enhance

customer’s experience and satisfaction. The inspiration behind this proposed work is based on

security of customer’s confidential and transactions within a financial organization. Suppose a

customer is transferring money to complete a purchase from his/her bank account, he/she would log

in to online banking and transfer the amount to the account of the business organization using their

account number. When the transaction is done, the bank updates the transaction records. The problem

is that these types of transactions can be tampered with very quickly by hackers or even an authorized

user. Record keeping of data and transactions are a crucial part of the business. Often, this information

is handled in house or passed through a third party like brokers, bankers, or lawyers increasing time,

cost, or both on the business, this involvement of third party makes the customers or user of the

ecommerce system to be at stake of intrusion by unauthorized user or cyber-attackers.

1.3 AIMS AND OBJECTIVES OF THE STUDY

The aim of this project is to design and implement an Ethereum Blockchain Based E-Commerce

System to address the shortcomings associated with the current system.

The main objectives behind this proposed work are to achieve the following:

i. To devise a way to remove the third-party involved in customer transactions while retaining

the important features and characteristics present in the current system using web3

technology.

ii. To address the issue of ownership of data and information of the user by third party by using

the Ethereum blockchain.

iii. To improve the security and establish the privacy of user by using a decentralized blockchain

system.
1.4 SIGNIFICANCE OF THE STUDY

The significance of this study was to help and give benefit to the customers, corporations and the

parties involved in a monetary transaction via the use of ecommerce system, the Ethereum blockchain

ecommerce system allows the users the privilege of self-monitoring and controlling of one transaction

in a secured and unalterable environment.

Furthermore, it would improve and address the issue of hierarchical ownership of data in the

existing ecommerce platform.

1.5 SCOPE OF THE STUDY

This research work is based on and covers these three basic operations, which are:

 Connecting to the ecommerce system via the web3 provider.

 Accessing the available products (uploaded by the admin) via the product

interface/page.

 Processing of payment made by users by the ethereum network.

1.6 LIMITATIONS TO THE STUDY

This project is limited to solely to the design and implementation of Ethereum blockchain based

ecommerce system. The data used in this study is secondarily sourced as it concerns the general

public, this project is presented to the public as a prototypic work and can later be advanced for direct

usage in future.
1.7 DEFINITION OF TERMS

1. Ecommerce: E-commerce is the activity of electronically buying or selling of products on

online services or over the Internet

2. System: a set of things working together as parts of a mechanism or an interconnecting

network; a complex whole.

3. Online: Online is the condition of being connected to a network of computers or other

devices.

4. Business: A business is defined as an organization or enterprising entity engaged in

commercial, industrial, or professional activities.

5. Ethereum: It is a decentralized blockchain platform that establishes a peer-to-peer network

that securely executes and verifies application code, called smart contracts.

6. Smart Contract: A smart contract is a computer program or a transaction protocol that is

intended to automatically execute, control or document legally relevant events and actions

according to the terms of a contract or an agreement.

7. Internet: It is a global computer network providing a variety of information and

communication facilities, consisting of interconnected networks using standardized

communication protocols.

8. Nodes: set of connected components of a system or subsystem.

9. Data: is a set of values of either qualitative or quantitative variables.

10. Polygon network: is the framework and protocol for building Ethereum-compatible

blockchain network.
CHAPTER TWO

LITERATURE REVIEW

2.1 Related works on Blockchain based Ecommerce System

Several attempts and approaches had been implemented to address the issue of insecurity of the

existing ecommerce system which proved abortive or sometimes leads to the generation of another

vital issues ,however, the ecommerce system still prevalent today uses the online processing

technology which is limited in security, where transaction parties details is shared with the third party

and some of their details resides on online clouds, this could be accessed by an authorised person that

by one way or the other taps into the users account via by hacking or leakage of user’s data.

In light of the above,R.vishnu Prasad et al.(2018),in their research work titled “A Decentralized

Marketplace Application on The Ethereum Blockchain “ made an exploration on the use of

blockchain technology to develop a decentralized online ecommerce system that seeks to eradicate

the shortcomings observed in the use of the traditional system, the work majorly seeks to opine an

alternative to a current centralized marketplaces such as eBay, in the course of the research

undergone, the drawbacks in the current system forms the backbone of the work, the drawbacks are

as follows in description: ability to block merchants at their own whim, the fees paid to the platform

when listing a product and when selling a product, and the lack of privacy of users’ data. According

to the paper, a proposition of an application that remedies all three of these drawbacks through use of

the Ethereum blockchain platform was made. The application was developed using the Truffle

development framework. The application’s functions were contained within an Ethereum smart

contract, which was then migrated to the Ethereum network. The user’s input was read through a web

interface and sent to the Ethereum network via the web3.js API. Statistics about the application were

gathered on the Rinkeby test network. The application was shown to have an average transaction

runtime of 3.8 seconds, and an average gas consumption of 4.6 Wei. Contract creation times for the

application were shown to be less than a second. A cost analysis of the application was then
conducted. The gas consumption of the transactions needed to both buy and sell a product was

converted into US dollars, and the gas cost of the application was then compared to the cost to use an

online auction marketplace such as eBay as well as an in-person auction house such as Sotheby’s.

The results showed that selling on the application is cheaper than existing online options as well as

existing in-person options. These tests showed that our application was successful in addressing the

drawbacks of current auction marketplaces.

Kayode et al.(2019),presented a work titled “Application of Cryptocurrencies using Blockchain for

E-Commerce Online Payment”, this work centred majorly on the use of cryptocurrencies in a general

sense ,it seeks to devise the use of blockchain technology as alternative mode of investment thereby

rendering the traditional mode as obsolete and insecure due to the drawbacks discovered therein, in

sequel the scope of this work is discussed in details according to the researchers involved in the work

: To understand the real-time security threats that people have of cryptocurrencies and the prospects

of cryptocurrency as a potential investment, a questionnaire on cryptocurrencies and its applications,

potential risks seen by people, and its likelihood as an investment option. The major security issues

reported with cryptocurrencies are attacks on cryptocurrency wallet, time jacking, 51% attack, double

spending, selfish mining, and fork issues. These issues are addressed by applying appropriate

resolution techniques. Lack of common international governance and regulation has been found to be

the primary cause of abuses of Blockchain technology. This mandates that the world community

come together and lay regulations and policies for preventing abuses on Blockchain technology.

Hampo (2011) in his work adopted the Structured System Analysis and Design Methodology

(SSADM) which made emphasis on completing a phase of the software development before

proceeding to the next phase and also being able to review other phases in sequential manner. The

model adopted in this project is the Rapid Application Development (RAD) model proposed by

International Business Machine (IBM) in 1980 and introduced to software community by James

Martins through his book titled Rapid Application Development. though it was not a Web- based
application but a desktop application which made the system less valuable as compared to web

applications.

João Carlos Oliveira Lago (2020), in his dissertation published two recent years ago titled

“Decentralized Application for E-Commerce Using Blockchain and Trusted Compute”, (Dapp for

short), in this work major tools used were metamask and infura. Infura provides a remote Ethereum

node to be able to interact with Ethereum without having to run our own node, while metamask is a

browser plugin that once installed creates a few key pairs to be used as accounts on Ethereum. Docker

was used to create container images of the application to be executed off-chain by the iExec workers

using Intel SGX, and Docker Compose was used to orchestrate the iExec stack to get a better

understanding of how it worked. The Ganache tool is used to create a local blockchain simulation,

and it was used in a docker container as part of the iExec stack orchestration. The web client is based

on node.js, and the React library was a big component. The web3.js library collection was used in the

web client to interact with the remote Ethereum node in making transactions and fetching data from

the blockchain. The web client on the other hand was implemented via the use of node.js using the

React library, it does not connect to any server outside the host to perform authentication. The private

key is only stored locally and never leaves the user’s computer, the private key is only used for local

signing of messages and transactions. It makes use of the web3.js library to easily create objects

containing the transaction conditions, sign them and seamlessly transmit them to the remote Ethereum

node provided by Infura. the undone part of this work to be improved on remains the followings:

dispute resolution: Since this project aims to layout a fully decentralized e-commerce platform,

thought needs to be put into the dispute resolution mechanism which cannot be like current centralized

alternatives that rely on either the entity in charge of trading to act as escrow or have the responsibility

passed to a third party.

Sybil attack: A Sybil attack is when a single individual can use a number of pseudonymous identities

to subvert a system which relies on unique individual ratings or opinions, therefore the individual

gains as much influence equal to the number of pseudonymous identities the individual has which
could be many. This is a serious issue for this project, since sellers and products would have the

possibility of being rated or flagged and as there isn’t the use of an email or phone numbers present

on this platform, anyone could create multiple Ethereum accounts, and therefore identities, with ease.

Since the platform is aiming for security and anonymity, a solution needs to be devised to identify

unique individuals while maintaining their privacy in a decentralized platform. For this the most

promising non evasive solutions on the cryptocurrency space are Idena [36] and Proof of Humanity

by Kleros [37].

Accepting Cryptocurrencies:

While a focal point of this project was to allow for credit card payment, thus enabling larger user

adoption, a feature which accepted cryptocurrency as payment should still be considered since the

project already dabbles in the cryptocurrency to pay for transaction fees, and it uses the Ethereum

network as an essential component for decentralization.

Ethereum Meta Transactions:

Since it is a barrier of entry for the buyer to have to own cryptocurrency to pay for purchase

transaction fees, through the use of meta-transactions the transactions would still be signed by the

buyer but funded by the seller.

The above areas are left unexplored by the author of the work, and this forms part of the basis of our

work in this research work.

According to the work done on the subject matter “Cyber Security Intelligence and Ethereum

Blockchain Technology for E-commerce” by Mujeeb-ur-Rehman et al.(2021),the challenge posed by

offloading data of applications from user devices to servers via the Ethereum blockchain motivates

this researchers to explore a device that could be used to mitigate this problem of insecurity and at

the conclusion all hands were put to desk claiming that the incorporation of cybersecurity intelligence

into the Ethereum blockchain based ecommerce system seems to be the best approach at hand for the

present context, The network consists of Ethereum nodes that can implement symmetric security to
provide valid and secure hashing of data in distributed computing. The simulation results show that

the proposed blockchain-enabled system outperforms all existing systems in terms of security,

thereby making it a competitive and feasible remedy to the situation at hand.it adopts the use of

cryptography and presents Ethereum Blockchain which provides end-to-end security, it is used to run

decentralized digital application which empower users for direct agreements, and transactions to buy,

sell, and trade goods without involving third party. To sidestep related organization for any

transaction and creating personal crowd source instead of running crowded sites. Ethereum promote

network of computers which act as supercomputers and it is second-largest cryptocurrency supporting

platform after Bitcoin.

2.1 OVERVIEW OF EXISTING ECOMMERCE SYSTEM

E-Commerce or Electronics Commerce is a methodology of modern business, which addresses the

need of business organizations, vendors and customers to reduce cost and improve the quality of

goods and services while increasing the speed of delivery. Ecommerce refers to the paperless

exchange of business information using the following ways −

 Electronic Data Interchange (EDI)

 Electronic Mail (e-mail)

 Electronic Bulletin Boards

 Electronic Fund Transfer (EFT)

 Other Network-based technologies


E-Commerce provides the following features −

 Non-Cash Payment − E-Commerce enables the use of credit cards, debit cards, smart

cards, electronic fund transfer via bank's website, and other modes of electronics

payment.

 24x7 Service availability − E-commerce automates the business of enterprises and the

way they provide services to their customers. It is available anytime, anywhere.

 Advertising / Marketing − E-commerce increases the reach of advertising of products

and services of businesses. It helps in better marketing management of

products/services.

 Improved Sales − Using e-commerce, orders for the products can be generated

anytime, anywhere without any human intervention. It gives a big boost to existing

sales volumes.

 Support − E-commerce provides various ways to provide pre-sales and post-sales

assistance to provide better services to customers.


 Inventory Management − E-commerce automates inventory management. Reports

get generated instantly when required. Product inventory management becomes very

efficient and easy to maintain.

 Communication improvement − E-commerce provides ways for faster, efficient,

reliable communication with customers and partners.

2.3 CONCEPT OF EXISTING ECOMMERCE SYSTEM SECURITY

Ecommerce security is the guideline that ensures safe transactions through the internet. It consists

of protocols that safeguard people who engage in online selling and buying goods and services. You

need to gain your customers’ trust by putting in place Ecommerce security basics. Such basics

include:

 Privacy

 Integrity

 Authentication

1. Privacy

Privacy includes preventing any activity that will lead to the sharing of customers’ data with

unauthorized third parties. Apart from the online seller that a customer has chosen, no one else

should access their personal information and account details.

A breach of confidentiality occurs when sellers let others have access to such information. An

online business should put in place at least a necessary minimum of anti-virus, firewall, encryption,

and other data protection. It will go a long way in protecting credit card and bank details of clients.
2. Integrity

Integrity is another crucial concept of Ecommerce Security. It means ensuring that any information

that customers have shared online remains unaltered. The principle states that the online business is

utilizing the customers’ information as given, without changing anything. Altering any part of the

data causes the buyer to lose confidence in the security and integrity of the online enterprise.

3. Authentication

The principle of authentication in Ecommerce security requires that both the seller and the buyer

should be real. They should be who they say they are. The business should prove that it is real, deals

with genuine items or services, and delivers what it promises. The clients should also give their

proof of identity to make the seller feel secure about the online transactions.
CHAPTER THREE

SYSTEM ANALYSIS AND DESIGN METHODOLOGY

This chapter introduces the analysis and methodologies adopted in the implementation of Ethereum

blockchain based E-commerce system, it also presents the existing system architecture, advantages

and the problems of the existing and proposed system architecture.

Furthermore, this shows the justification of the research methodology.

3.1 SYSTEM ANALYSIS

System analysis is a process of collecting and interpreting facts, identifying the problems, and

decomposition of a system into its components. Systems analysis can also be describe as a process

of collecting factual data, understanding the processes involved, identifying problems and

recommending feasible suggestions for improving the system functioning. This involves studying the

business processes, gathering operational data, understand the information flow, finding out

bottlenecks and evolving solutions for overcoming the weaknesses of the system so as to achieve the

organizational goals. System Analysis also includes subdividing of complex process involving the

entire system, identification of data store and manual processes. (Soni, 2010).

3.2 ANALYSIS OF THE EXISTING SYSTEM

The architecture of the existing system is as depicted below:


The architecture of the existing system is made up of User Interface(via the browser),business rules

and applications and the data services ,these components are integrated to form the web-based

ecommerce system platform, the components facilitates the operation and the security of the whole

system.

LIMITATIONS OF THE EXISTING SYSTEM

After thorough scrutinization of the system the problems encountered in the usage of the current

ecommerce system in the world at large is numerous and outgrows the benefit derived in the usage,

few of the problems are as follows:

 The problem of insecurity

 Lack of privacy

 Hierarchical ownership of data

 Fees imposed by the third party involved in transactions


also, customers’ trust is at the stake of violation, the system is generally not safe to use by a large

purchaser\merchants as it exposes their financial status and if leaked, it could bring risk of safe-

living and movement of such category of persons or organisation, the system also poses the risk of

data loss and transaction forfeiture and counterfeiting of transaction receipt etc.

3.3 JUSTIFICATION OF THE NEW SYSTEM

In the view of the problems inherent in the existing system, it is important to seek for advancement

of technology and improvement. This improvement is the motive behind the implementation of the

Ethereum blockchain based ecommerce system.

This new system will be equipped with the following benefits and advantages:

1. To ensure a safe and timely transaction with less risks,

2. To phase out the obsolete and penetrable methodology of the existing system, though the

important feature\component will be kept unchanged but improved upon,

3. To save time and resources,

4. To make purchase accessibility easy and secured,

5. To minimise risks and insecurity associated to purchase over the ecommerce system.
RESEARCH METHODOLOGY

The methodology adopted for this research work is structured system analysis and design

methodology (SSADM). Structured system analysis and design methodology (SSADM) is a systems

approach to the analysis and design of information systems. This method develops better quality

systems by segmenting application development project into modules, stages, steps, and provides a

framework for describing project in a fashion suited to manage the project. SSADM sets out cascade

view of systems development, in which there are a series of steps, each of which leads to the next

step and progress is seen as flowing steadily downwards through these steps.

In the Phase I, the user connects to the system via their wallet which is verified on the network via

the web3 provider

In the Phase II the user can process their payments through validations of blocks which is created on

the network

3.4 SOFTWARE DEVELOPMENT MODEL

A software process or development model represents the order in which the activities of software

development will be undertaken. It describes the sequence in which the phases of the software

lifecycle will be performed. It details the order or manner in which the software will be realized and

developed from the business understanding and requirements elicitation phase to convert these

business ideas and requirements into functions and features until its usage and operation to achieve

the business needs These activities may involve the development of the software from the scratch, or,

modifying an existing system. In this research work Big Bang software development life circle

(SDLC) model is adopted.


Big Bang model:

The Big bang model is an SDLC model that starts from nothing. It is the simplest model in SDLC

(Software development life cycle) as it requires almost no planning. However, it requires lots of funds

and coding and takes more time. The name big bang model was set after the “great Big Bang” which

led to the development of galaxies, stars, planets, etc. Similarly, this SDLC model combines time,

efforts and resources to build a product. The product is gradually built as a requirements from the

customer comes. The diagram for Big bang model is depicted as shown below:

Design:

The product requirements are understood and implemented as they arrive. The complete modules or

at least the part of the modules are integrated and tested. All the modules are run separately and the

defective ones are removed to find the cause.

it is a suitable model where requirements are not well understood and the final release date is not

given.

When to use it and where not to:

This SDLC model is suitable for small projects when few people are working on the project, the

customers demand s are not exact and keep changing, or if it is a dummy/side-project. As there is no

proper planning in this model it is considered the worst SDLC model and is highly unsuitable for

large projects.
Features of a Big bang model:

 Not require a well-documented requirement specification

 Provides a quick overview of the prototype

 Needs little effort and the idea of implementation

 Allows merging of newer technologies to see the changes and adaptability.

Pros of Big Bang model:

 There is no planning required for this.

 Suitable for small projects.

 Very few resources are required.

 Easy to implement

 It develops the skills of the newcomers

 Very much flexible for developers working on it.

 As there is no proper planning, hence it does not require managerial staffs

Cons of Big Bang Model:

 Not suitable for large projects.

 Highly risky model and uncertain.

 Might not be expensive if requirements are not clear.

 Poor model of ongoing projects.


3.5 SYSTEM DESIGN

This is the process of defining the architecture, component or module, interfaces and data for a system

to satisfy specified requirement. This system is specifically designed to enable input, processing, and

output of blood donor’s information at any time it eliminate the scarcity of blood donors in time of

emergencies. However, the information and result obtained from system analysis stage are to be use in

designing and developing the new effective and efficient system that will solve the problem encounter

by the existing system of blood donation information system.

The diagrams used in representing the implemented system are; Architecture diagram and Flowchart

diagram.

3.5.1 Architecture of the implemented System

The implemented system provides easier way for the users of the ecommerce system to perform safe

and secured transactions.

The system allows a customer to register and login, after logging in, the user can perform a search

product operation on the system, after the customer finds the product he/she wants to buy, he/she can

add the product to the cart. After the product has been added to the cart, the next thing is to make

payment for the product, in the existing e-commerce system, the customer can only pay using

payment gateways or their bank, but in this system, payment can only be done via a web3 provider

which then processes the payment on the ethereum blockchain, if the payment is successful, the web3

provider would emit an event that contains the transaction hash, timestamp, value, and other important

transactions data.

Fig 1.0 System Flowchart

Start

Admin
Customer

Login Register
No No
Login

Yes Yes

Add category

View product

Buy product Add product


and add to cat

Manage order

Payment
Manage payment

Web3
Check feedback

Web3 provider

Ethereum mainet Report

Sign Tx

Payment successful

Logout
Fig. 2.0 USER CASE DIAGRAM OF THE IMPLEMENTED SYSTEM

3.6 SOFTWARE/HARDWARE REQUIREMENTS

The computer hardware is the physical components of the computer system.

The hardware requirements of this website are:

1. Minimum of Pentium M processor with 1.4GHZ speed

2. Minimum of 1gb of Ram

3. Hard disk of at least 40GB

Then the software applications that are necessary for the Implementation of this application are:

1. Operating system: window 7 / Linux /Android, iOS and Above

2. Browsers: Google Chrome / Mozilla Firefox /Safari.

3. Web3 Providers: Meta mask / Trust Wallet


3.7 TECHNOLOGY OVERVIEW

The following technologies were used to develop the system:

 React

React (also known as React.js or ReactJS) is a free and open-source front-end JavaScript

library for building user interfaces based on UI components. It is maintained by Meta (formerly

Facebook) and a community of individual developers and companies. React can be used as a base

in the development of single-page, mobile, or server-rendered applications with frameworks

like Next.js. However, React is only concerned with state management and rendering that state to

the DOM, so creating React applications usually requires the use of additional libraries for

routing, as well as certain client-side functionality.

 JavaScript

It is a lightweight, interpreted, or just-in-time compiled programming language with first-class

functions. While it is most well-known as the scripting language for Web pages, many non-

browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.

JavaScript is a prototype-based, multi-paradigm, single-threaded, dynamic language, supporting

object-oriented, imperative, and declarative (e.g., functional programming) styles.

 Redux

It is an open-source JavaScript library for managing and centralizing application state. It is most

commonly used with libraries such as React or Angular for building user interfaces. Similar to

Facebook's Flux architecture, it was created by Dan Abramov and Andrew Clark.

 React-Redux

React Redux is the official React binding for Redux. It allows React components to read data

from a Redux Store, and dispatch Actions to the Store to update data. Redux helps apps to scale

by providing a sensible way to manage state through a unidirectional data flow model. React

Redux is conceptually simple.

 Web3.js
web3.js is a collection of libraries which allow you to interact with a local or remote Ethereum

node, using a HTTP or IPC connection. The web3 JavaScript library interacts with the Ethereum

blockchain. It can retrieve user accounts, send transactions, interact with smart contracts, and

more.

 Webpack

Webpack is a free and open-source module bundler for JavaScript. It is made primarily for

JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the

corresponding loaders are included. Webpack takes modules with dependencies and generates

static assets representing those modules.

 Firebase

Google Firebase is a Google-backed application development software that enables developers

to develop iOS, Android and Web apps. Firebase provides tools for tracking analytics, reporting

and fixing app crashes, creating marketing and product experiment

 Node.js

It is an open-source, cross-platform, back-end JavaScript runtime environment that runs on

the V8 engine and executes JavaScript code outside a web browser. Node.js lets developers use

JavaScript to write command line tools and for server-side scripting—running scripts server-side

to produce dynamic web page content before the page is sent to the user's web browser.

Consequently, Node.js represents a "JavaScript everywhere" paradigm, unifying web-

application development around a single programming language, rather than different languages

for server-side and client-side scripts.

 Web3 Provider

Web3 providers, also known as Node providers, are essentially blockchain data keepers. These

projects run networks of hundreds of blockchain nodes, and are tasked with providing applications

with the latest and historical blockchain data. The Web3 provider is an essential part of a

blockchain-powered application.
CHAPTER FOUR

SYSTEM IMPLEMENTATION AND MAINTENANCE

The New System consists of different modules working together to achieve the goal of the improved

version of the existing system, it consists of two major interfaces, The User interface (Users) and the

Administrative Interface.

4.1 User Interface

Home Page

This is the first page a potential buyer sees immediately they access the system, it contains all

necessary navigation to all other pages, and most importantly is houses the button to connect the

potential buyer wallet.


Products Page: The products page contains the list of products that are available for sale
Web3 Provider: Here metamask was used as the web3 provider, it is used to connect to a blockchain

network.

1 2
Cart

This page contains the list of products that the buyer has added to cart. After the products has been

added to the cart, the next stage is to proceed to checkout.

Checkout

In the checkout page, the buyer needs to fill in their shipping details in order to receive their purchases

at preferred location.
4.2 Database

The database was developed using firestore, firestore is a tool under firebase. The database is a nosql

database. The database contains the following collections

 Account: This collection holds the data of all wallet addresses that were used in

transactions

 Products: This collection holds the data about the products that the ecommerce system

offers.

 Transactions: This collection holds the data of all transaction made on the system by

users

 Shipping address: It holds the shipping address used for each transactions, each shipping

address is attached with it own unique wallet address which is gotten from the transaction.

4.3 SYSTEM MAINTENANCE

The system is friendly and flexible enough to accept future modification to correct anomalies or bugs

if discovered in order to improve the performance and other featuring attributes.


 It supports augmentation of new modules,

 It supports file inclusion and

 Improvements of components and its updates version.


CHAPTER FIVE

SUMMARY, CONCLUSION AND RECOMMENDATIONS

5.1 Summary

In summary, it is the main objective of the system to provide an easy-to-use application that acts as

P.A(personal assistant) by providing the user with efficient, optimal and easy purchase over the

ecommerce system platforms.

It offers optimization by considering various user constraints as well as other resources such as

location of activities, travel signal strength depending on internet connectivity.

It provides a web interface and/or other applications.

5.2 Conclusion

An Ethereum blockchain based ecommerce system will be a useful research tool that will open up

new techniques for making online purchase on Ecommerce systems. It saves time and cost efficient

as compared to the existing ecommerce system in use. In designing application for this project, the

adopted technology in this work is taken as suitable options among many alternatives at hand.

This project will provide some extension to the ecommerce system that will allow the users to connect

on a secured extension plugin (w3 providers).it increases the confidentiality of users overriding the

fear of making purchases on ecommerce platforms.

Ethereum based Ecommerce system offers friendliness to the users and considerable ease of

accessibility and usage as they can perform transactions easily and in snap! of a finger than the

conventional medium of current ecommerce systems.

Our ultimate concern Is the Ethereum blockchain ecommerce system security strength; how could

the system be intruded by cyber-attackers, including the system administrators (who may be in the

favour of the attackers).


Finally, the system security should be allowed to be supervised by a trusted personnel expertise in

the field of system programming, cybernetics and system analysis and design, computer programming

etc.

5.3 Recommendations

We recommend this project work to the general public, users of ecommerce system and also opined:

1. A more extensive research should be fashioned out using the technologies, methodologies and

encapsulated portion of this work to be used in execution of a complex application/process

which is expected to surpass all that this work entails.

2. A good set of trustworthy administrators should be in charge of the system administration.

3. If there is any chance or opportunity of improving this work there should be no hesitation.
REFERENCES

"SECURE CRYPTOCURRENCY ECOMMERCE PROCESSING", Tristan, Canada.

[10] "Ethereum app for e-commerce", eliNext, USA, (2019).

[11] Gagan Mehra, "Blockchain Vendors with Solutions for Ecommerce", Practical Ecommerce,

(2018) September 27.

[12] "The Potential Impact of Blockchain Technology on Ecommerce", Sales & Orders, (2018)

February 20.

[13] dApp Builder team, " How Blockchain will Improve E-Commerce", DAPPS BUILDER, (2018)

July 27.

[14] "8 Blockchain Applications That Could Help Your Small Business", Upwork, San Francisco,

CA, (2018).

[15] Ved Prakash, " 4 Ways Blockchains Will Redefine eCommerce", GlobalSign, New Hampshire,

America, (2018) August 7.

[36] Anonymous authors. Idena. [Online]. Available: https://github.com/idena-network. Accessed:

25/7/2020.

[37] C. Lesaege. Kleros: Proof of humanity. [Online]. Available: https://docs.google.com/

document/d/1z01MS0-h75ESVmWymU2Gv3Z43p35oZAFtQLStOeu7Ek/edit#heading=h.

w7l0ot1fwng. Accessed: 25/7/2020.

[7] "10 Ways Blockchain Technology Will Change E-commerce Business", ProBytes Software,

India, (2018) April 26.

[8] Jia Wortz, "Cybersecurity: How Blockchain Is Helping E-Commerce Businesses Protect Their

Data", Forbes, (2017) October 31.

[9] "10 Potential Blockchain Platforms to Watch Out in 2018", new gen apps, India, (2018) May 3.
A. Yadav, D. Yadav, S. Gupta, D. Kumar, and P. Kumar (2018). “Online Food Court Payment

System using Blockchain Technolgy,” doi: 10.1109/UPCON.2018.8596794.

Alam Khan, F., Asif, M., Ahmad, A., Alharbi, M. and Aljuaid, H.,(2020). Blockchain technology,

improvement suggestions, security challenges on smart grid and its application in healthcare

for sustainable development. Sustainable Cities and Society, 55, p.102018.

Alex, T. and Don, T., (2020). How Blockchain Is Changing Finance. [online] Capital.report.

Available at: <https://capital.report/Resources/Whitepapers/8e8d2fd2-9bef-40d5-

9ff6a2fed8ab1f09_finance_topic2_source2.pdf> [3] Apau, R., Koranteng, F. and Gyamfi, S.,

2019. Cyber-Crime and its Effects on E-Commerce Technologies. Journal of Information,

5(1), pp.39-59.

Anmol Gupta (2018), "How can blockchain make ecommerce better?", Quora, February 8.

B. Guidi, “When Blockchain meets Online Social Networks,” Pervasive and Mobile Computing.

2020, doi: 10.1016/j.pmcj.2020.101131

Bob Mason, "How Can Blockchain Change E-Commerce", FXEMPIRE.

C. Lin, D. He, X. Huang, M. K. Khan, and K. K. R. Choo, “DCAP: A Secure and Efficient

Decentralized Conditional Anonymous Payment System Based on Blockchain,” IEEE Trans.

Inf. Forensics Secur., 2020, doi: 10.1109/TIFS.2020.2969565.

Chen, J., Lv, Z. and Song, H., (2019). Design of personnel big data management system based on

blockchain. Future Generation Computer Systems, 101, pp.1122-1129. [5] Chong, J., 2020.

Alternatives To Blockchain. [online] Medium. Available at:

<https://medium.com/@jimmysong/alternatives-to-blockchain-9f858c0a1f2d> [Accessed 14

April 2020].

Detrixhe, J.,(2020). Share Of Login Attempts That Are Credential Stuffing Attacks. [online] Atlas.

Available at: <https://theatlas.com/charts/H1M7IK2Q7> [Accessed 28 April 2020]. Drolet,

M., 2020. 4 Reasons Blockchain Could Improve Data Security. [online] CSO Online.
Available at: <https://www.csoonline.com/article/3279006/4-reasons-blockchain-

couldimprove-data-security.html> [Accessed 11 April 2020].

Dmytro Spilka (2018), "How Blockchain is Beginning to Revolutionize eCommerce", BUSINESS 2

COMMUNITY, October 2.

Green, D., Hanbury, M. and Cain, A., 2020. If You Bought Anything from These 19 Companies

Recently, Your Data May Have Been Stolen. [online] Business Insider Malaysia. Available

at: <https://www.businessinsider.my/data-breaches-retailers-consumer-companies-

20191?r=US&IR=T> [Accessed 12 April 2020].

H. Albayati, S. K. Kim, and J. J. Rho (2020). “Accepting financial transactions using blockchain

technology and cryptocurrency: A customer perspective approach,” Technol. Soc., 2020,

.1016/j.techsoc.2020.101320. “Selling fees,” eBay Customer Service. [Online]. Available:

https://www.ebay.com/help/selling/fees-credits-invoices/sellingfees?id=4364. [Accessed:

11-Jun-2018].

Ha, M., Kwon, S., Lee, Y., Shim, Y. and Kim, J., 2019. Where WTS meets WTB: A Blockchainbased

Marketplace for Digital Me to trade users’ private data. Pervasive and Mobile Computing, 59,

p.101078.

Hackernoon (2020). Databases and Blockchains, The Difference Is in Their Purpose and Design.

[online] Available at: <https://hackernoon.com/databases-and-blockchains-the-difference-is-

intheir-purpose-and-design-56ba6335778b>

Hampo, A.J. (2011), Design and Implementation of Student Verification System.available at:

https://www.academia.edu/5135050/Design _and_ implementation _of_

student_verification_system_for_delta_state_university_nigeria_delsu_Everify_by_Hampo_

johnpau_Anene Chkwu.

http://www.iaeme.com/IJM/index.asp 1697 [email protected]

International Journal of Management, Technology and Engineering

Investopedia https://www.investopedia.com/terms/b/blockchain.asp
J. Ahn, M. Park, and J. Paek (2018). “Reptor: A Model for Deriving Trust and Reputation on

Blockchain-based Electronic Payment System,” 2018, doi: 10.1109/ICTC.2018.8539641. S.

V. Akram, P. K. Malik, R. Singh, G. Anita, and S. Tanwar (2020). “Adoption of blockchain

technology in various realms: Opportunities and challenges,” Secur. Priv., 2020, doi:

10.1002/spy2.109.

K. J. Smith and G. Dhillon (2019), “Assessing blockchain potential for improving the cybersecurity

of financial transactions,” Manag. Financ., doi: 10.1108/MF-06-2019-0314.

Koteska, Bojana & Karafiloski, Elena & Mishev, Anastas. (2017). Blockchain Implementation

Quality Challenges: A Literature Review.

Lansiti, M. and R. Lakhani, K., 2020. The Truth About Blockchain. [online] Harvard Business

Review. Available at: <https://hbr.org/2017/01/the-truth-about-blockchain>

Manish Dudharejia (2018). "4 Ways to Make Your E-Commerce Site More Secure", TotalRetail,

May 30.

Medium. 2020. How Blockchain Technology Works. [online] Available at:

https://medium.com/@ipspecialist/how-blockchain-technology-works-e6109c033034

Metelin, S., 2020. The Role of Blockchain in Data Security. [online] Info security Magazine.

Available at: <https://www.infosecurity-magazine.com/opinions/role-blockchain-

datasecurity/>

Muzammal, M., Qu, Q. and Nasrulin, B., 2019. Renovating blockchain with distributed databases:

An open-source system. Future Generation Computer Systems, 90, pp.105-117.

Nathan, S., Govindarajan, C., Saraf, A., Sethi, M. and Jayachandran, P., 2019. Blockchain meets

database. Proceedings of the VLDB Endowment, 12(11), pp.1539-1552. [17] O'Neal, S.,

2020. Blockchain Interoperability, Explained. [online] Cointelegraph. Available at:

<https://cointelegraph.com/explained/blockchain-interoperability-explained>
Paik, Hye-young & Xu, Xiwei & Bandara, Dilum & Lee, Sung & Lo, Sin Kuang. (2019). Analysis

of Data Management in Blockchain-based Systems: From Architecture to Governance. IEEE

Access. PP. 1-1. 10.1109/

Palavesh, S., 2020. Here's How You Can Secure Your Data with Blockchain. [online] Entrepreneur.

Available at: <https://www.entrepreneur.com/article/318477>

Panoho, K., 2020. Council Post: The Age of Analytics and The Importance of Data Quality. [online]

Forbes. Available at: https://www.forbes.com/sites/forbesagencycouncil/2019/10/01/the-age-

of-analytics-and-theimportance-of-data-quality/#527fa32a5c3c

R. Mathew, A., 2019. Cyber Security through Blockchain Technology. International Journal of

Engineering and Advanced Technology, 9(1), pp.3821-3824.

Ramachandiran, Rajesh. (2018). Using Blockchain Technology to Improve Trust in Ecommerce

Reviews. 10.13140/RG.2.2.29324.00646. [23] Roussev, V., 2009. Hashing and Data

Fingerprinting in Digital Forensics. IEEE Security & Privacy Magazine, 7(2), pp.49-55.

Rick Martin (2018), "How Blockchain is Impacting Ecommerce", Ignite, November 29.

RubyGarage (2018). “How the Blockchain Works”.. Available from:

https://rubygarage.org/blog/howBlockchain-works [09 Jul 2018].

S. I. Kim and S. H. Kim (2020), “E-commerce payment model using blockchain,” J. Ambient Intell.

Humaniz. Comput.,doi: 10.1007/s12652-020-02519-5.

Saakian, H.(2020). How Blockchain Has Helped the Business of E-Commerce - Asia Blockchain

Review - Gateway to Blockchain in Asia. [online] Asia Blockchain Review - Gateway to

Blockchain in Asia. Available at: https://www.asiablockchainreview.com/how-

blockchainhas-helped-the-business-of-e-commerce/

Saleh Hadidi, Maen Al-Rashdan, Mamoun Hadidi, 2020. Impact Web on Decision Support Systems

on The Organizations. Journal of Critical Reviews, 7(3):2020.


Sharma, T., (2020). Top 10 Blockchain Solutions for E-Commerce. [online] Blockchaincouncil.org.

Available at: <https://www.blockchain-council.org/blockchain/top-10-blockchainsolutions-

for-e-commerce/>

Stella, C.C and Franca,A.E (2006). Principles of System Analysis and Design.Rootprint and

Publisher, Benin-city, Nigeria.

Suciu, P., (2020). The Biggest Cybercrime Threats Of 2019. [online] Ecommercetimes.com.

Available at: https://www.ecommercetimes.com/story/85782.html

SZ Chuen, Al-Rashdan M, Al-Maatouk Q: Cloud Data Processing Network Via Online Game Users.

Journal of Critical Reviews 2019, 7(3):2020. https://doi.org/10.31838/jcr.07.03.17 [29]

Trivedi, D., Zavarsky, P. and Butakov, S., 2016. Enhancing Relational Database Security by

MetadataSegregation. Procedia Computer Science, 94, pp.453-458.Underwood, S., 2018.

Blockchain Beyond Bitcoin. Blockchain Beyond Bitcoin, 59(11). [30] Wen M., Yu S., Li J.,

Li H., Lu K. (2016) Big Data Storage Security. In: Yu S., Guo S. (eds) Big Data Concepts,

Theories, and Applications. Springer, Cham Wertz, J., 2019. While Data Breaches Accelerate,

It's Critical That E-Commerce Businesses Stay Safe. [online] Forbes. Available at:

<https://www.forbes.com/sites/jiawertz/2019/09/19/while-data-breachesaccelerate-its-

critical-that-e-commerce-businesses-stay-safe/#12fe312d4f5c>

Teo Min Xuan, Maen T. Alrashdan, Qusay Al-Maatouk and Mosab Tayseer Alrashdan

Volume IX, Issue II, FEBRUARY/2019 ,ISSN NO: 2249-7455 Page No: 784

W. Xie et al., “ETTF: A Trusted Trading Framework Using Blockchain in E-commerce,” 2018, doi:

10.1109/CSCWD.2018.8465233.

Wikipedia https://en.wikipedia.org/wiki/Node.js

Wikipedia https://en.wikipedia.org/wiki/React_(JavaScript library)

Xu, M., Chen, X. & Kou, G. A systematic review of blockchain. Financ Innov 5, 27 (2019).

https://doi.org/10.1186/s40854-019-0147-z
Y. Jiang, C. Wang, Y. Wang, and L. Gao, “A Privacy-Preserving E-Commerce System Based on the

Blockchain Technology,” 2019, doi: 10.1109/IWBOSE.2019.8666470.

Z. Liu and Z. Li (2019), “A Blockchain-based Information Model of Cross-Border E-Commerce,”.

https://www.getastra.com/blog/knowledge-base/ecommerce-security/
APPENDIX
PROGRAM SOURCE CODE

App.js

import Layout from "./components/Layout/Layout";

function App() {

return <Layout />;

export default App;

Layout.js

import React from "react";

import Header from "../Header/Header.jsx";

import Footer from "../Footer/Footer.jsx";

import Routes from "../../routes/Routers";

import Carts from "../UI/cart/Carts.jsx";

import { useSelector } from "react-redux";


const Layout = () => {

const showCart = useSelector((state) => state.cartUi.cartIsVisible);

return (

<div>

<Header />

{showCart && <Carts />}

<div>

<Routes />

</div>

<Footer />

</div>

);

};

export default Layout;

Router.js

import React from "react";

import { Routes, Route, Navigate } from "react-router-dom";

import Home from "../pages/Home";

import AllFoods from "../pages/AllFoods";

import ProductsDetails from "../pages/productsDetails";


import Cart from "../pages/Cart";

import Checkout from "../pages/Checkout";

import Contact from "../pages/Contact";

import Login from "../pages/Login";

import Register from "../pages/Register";

import Payment from "../pages/Payment";

const Routers = () => {

return (

<Routes>

<Route path="/" element={<Navigate to="/home" />} />

<Route path="/home" element={<Home />} />

<Route path="/products" element={<AllFoods />} />

<Route path="/produts/:id" element={<ProductsDetails />} />

<Route path="/cart" element={<Cart />} />

<Route path="/checkout" element={<Checkout />} />

<Route path="/contact" element={<Contact />} />

<Route path="/payment" element={<Payment />} />

</Routes>

);

};
export default Routers;

usePay.js

import { useSelector } from "react-redux";

export const usePay = () => {

const web3 = useSelector((state) => state.web3.web3);

const coin = useSelector((state) => state.coin.coin);

const FROM = useSelector((state) => state.account.account);

const Pay = () => {

const TO = "";

var ABI = null;

var CONTRACT_ADDRESS = null;

alert(coin)

switch (coin) {

case "USDT":

ABI = [];

CONTRACT_ADDRESS = "null";

break;

case "BUSD":
ABI = [];

CONTRACT_ADDRESS = "null";

tx(ABI, CONTRACT_ADDRESS, FROM, TO);

break;

case "DAI":

ABI = [];

CONTRACT_ADDRESS = "null";

tx(ABI, CONTRACT_ADDRESS, FROM, TO);

break;

case "USDC":

ABI = [];

CONTRACT_ADDRESS = "null";

tx(ABI, CONTRACT_ADDRESS, FROM, TO);

break;

default:

break;

const tx = async (ABI, CONTRACT_ADDRESS, FROM, TO) => {

const tokenContract = await new web3.eth.Contract(ABI, CONTRACT_ADDRESS);


console.log(tokenContract);

tokenContract.methods

.transfer(TO, 10)

.send({

value: 0,

from: FROM,

})

.on("receipt", function (receipt) {

// receipt example

console.log(receipt);

return receipt;

});

};

};

return Pay;

};

Checkout.js
import React, { useState } from "react";

import { useSelector } from "react-redux";

import { Container, Row, Col } from "reactstrap";

import CommonSection from "../components/UI/common-section/CommonSection";

import Helmet from "../components/Helmet/Helmet";

import "../styles/checkout.css";

import PayButton, { Buy } from "../web3/PayButton";

const Checkout = () => {

const [enterName, setEnterName] = useState("");

const [enterEmail, setEnterEmail] = useState("");

const [enterNumber, setEnterNumber] = useState("");

const [enterCountry, setEnterCountry] = useState("");

const [enterCity, setEnterCity] = useState("");

const [postalCode, setPostalCode] = useState("");

const shippingInfo = [];

const cartTotalAmount = useSelector((state) => state.cart.totalAmount);

const shippingCost = 30;

const totalAmount = cartTotalAmount + Number(shippingCost);


const submitHandler = (e) => {

e.preventDefault();

const userShippingAddress = {

name: enterName,

email: enterEmail,

phone: enterNumber,

country: enterCountry,

city: enterCity,

postalCode: postalCode,

};

shippingInfo.push(userShippingAddress);

console.log(shippingInfo);

};

return (

<Helmet title="Checkout">

<CommonSection title="Checkout" />

<section>

<Container>
<Row>

<Col lg="8" md="6">

<h6 className="mb-4">Shipping Address</h6>

<form className="checkout__form" onSubmit={submitHandler}>

<div className="form__group">

<input

type="text"

placeholder="Enter your name"

required

onChange={(e) => setEnterName(e.target.value)}

/>

</div>

<div className="form__group">

<input

type="email"

placeholder="Enter your email"

required

onChange={(e) => setEnterEmail(e.target.value)}

/>

</div>
<div className="form__group">

<input

type="number"

placeholder="Phone number"

required

onChange={(e) => setEnterNumber(e.target.value)}

/>

</div>

<div className="form__group">

<input

type="text"

placeholder="Country"

required

onChange={(e) => setEnterCountry(e.target.value)}

/>

</div>

<div className="form__group">

<input

type="text"

placeholder="City"

required
onChange={(e) => setEnterCity(e.target.value)}

/>

</div>

<div className="form__group">

<input

type="number"

placeholder="Postal code"

required

onChange={(e) => setPostalCode(e.target.value)}

/>

</div>

<PayButton />

</form>

</Col>

<Col lg="4" md="6">

<div className="checkout__bill">

<h6 className="d-flex align-items-center justify-content-between mb-3">

Subtotal: <span>{cartTotalAmount} BUSD</span>

</h6>

<h6 className="d-flex align-items-center justify-content-between mb-3">


Shipping: <span>{shippingCost} BUSD</span>

</h6>

<div className="checkout__total">

<h5 className="d-flex align-items-center justify-content-between">

Total: <span>{totalAmount} BUSD</span>

</h5>

</div>

</div>

</Col>

</Row>

</Container>

</section>

</Helmet>

);

};

export default Checkout;

You might also like