Giter Site home page Giter Site logo

bill-paymint's Introduction

bill-paymint

Description

This package offers users a platform to pay invoices using multiple cryptocurrency options. Users can upload invoices from their devices or capture a new photo.

This is a Next.js project bootstrapped with create-next-app.

Table of Contents

Getting Started

Install Dependencies

npm install

Run the Development Server

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000(or any other assigned port if port 3000 is busy, which can be found in the terminal) with your browser to see the result.

You can edit the page by modifying paygeon/components/InvoiceUploader/InvoiceUploader.tsx. The page auto-updates as you edit the file.

This project uses next/font to optimize and load Inter, a custom Google Font.

Usage

  • Upload an Invoice: Use an existing file on the device or capture a new photo.
  • Payment Details: Further steps are provided if payment details are found. Otherwise, an error message is displayed.
  • Verify Amount: Verify the invoice amount and final amount, including charges, to be paid.
  • Choose Cryptocurrency: Choose from five cryptocurrencies: BTC, ETH, LTC, DOGE, and TRX.
  • Make Payment: Pay the total amount in the selected cryptocurrency to the provided address using any wallet app.
  • Confirm Payment: Once done, confirm the payment using the button provided, triggering an acknowledgment email to both the user and the internal team.

Customization

Text is extracted from the uploaded image using Tesseract OCR. Various fields are further extracted using regex patterns, all being case-insensitive. Modify them according to your needs.

Total Amount

The total amount should be followed by any of the keywords Amount, Amount Due, Balance, Balance Due, Total, Total Due followed by an optional : and $. The total amount can also contain ,.

Customer Data

Customer data should be mentioned using the keywords: Bill To, Customer, followed by an optional :, with details in the following three lines:

  1. Name
  2. Email address
  3. Address

Merchant Data

Merchant data should be mentioned using the keywords: From, Merchant, followed by an optional :, with details in the following three lines:

  1. Name
  2. Email address
  3. Address

Merchant account number should be mentioned in the section with keywords Notes, Memo.

Crypto Options

The currently supported options are Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), Dogecoin (DOGE), and TRX.

Configuration

CryptAPI

The project uses CryptAPI to fetch market prices and generate addresses to receive payments.

  • Update the callback URL in paygeon/components/InvoiceUploader/InvoiceUploader.tsx.
  • Update the addresses for different cryptocurrencies and the email to receive payment confirmations in paygeon/app/api/payment.ts.

EmailJS

The project uses EmailJS to manage email notifications to the user and internal team. More information about setting up the EmailJS account can be found here.

  • Alter the template IDs and emails in the function handleConfirmPayment in paygeon/components/InvoiceUploader/InvoiceUploader.tsx.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

bill-paymint's People

Contributors

vashong avatar waleedkhano avatar dependabot[bot] avatar atlassian-compass[bot] avatar snyk-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.