a11rew / medusa-paystack-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Medusa Payment Paystack Demo

About

Description

Monorepo with Medusa Storefront, Admin and Backend to demo using medusa-payment-paystack for payments.

This comes with Ghana and Nigeria pre-configured as regions with Paystack payment support.

Set up Project

Prerequisites

Make sure you have PNPM on your machine.

Create a Paystack account if you do not already have one, obtain your public key and secret key from the dashboard.

Seed Database

Prepopulate an sqlite database for use in the backend.

pnpm --filter backend seed

Configure Environment Variables

Add your Paystack secret key to your backend's environment file.

// apps/backend/.env or apps/backend/.env.production for production env.

PAYSTACK_SECRET_KEY=sk_test|live_XXXXXXXXXXXXXX

Add your Paystack secret key to your storefront's environment file.

// apps/storefront/.env

NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY=pk_test|live_XXXXXXXXXXXXXX

Install dependencies

pnpm i

Start all apps - Backend, Admin, Storefront

pnpm start

Resources

About

License:MIT License


Languages

Language:TypeScript 95.2%Language:JavaScript 4.1%Language:CSS 0.7%Language:Dockerfile 0.0%Language:HTML 0.0%Language:Shell 0.0%