This mini application demonstrates the use of Maya Checkout API in order to accept card and e-wallet payments.
If you want to see the relevant integration code directly, see the file checkout.ts
This project was created with React (React Redux and Thunk) and TypeScript.
Do not build your application on top of this demo.
- Checkout API keys (public and secret)- needed as authorization in API calls
- Run
npm install
to install all needed packages. - Run
npm start
to start the application (App opens in http://localhost:3000 by default). You need to provide your public API key as an environment variable REACT_APP_CHECKOUT_PUBLIC_API_KEY.
Example:
REACT_APP_CHECKOUT_PUBLIC_API_KEY='pk-abcdefhij' npm start
- Adding products to cart
- Checking out products using Maya Checkout
Routing / handling of React views / pages
CSS for the application
Redux actions
Customized React components used within the application
Redux reducers
Redux thunks for handling asynchronous logic
Customized React views / pages
Service files - API calls
Type assertions
Helper functions