dappcoder / payper-gateway

API Routing Gateway with Hedera Hashgraph micro-payment verification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Payper Gateway

Payper Gateway is an HTTP (reverse) proxy that verifies payments to route requests. As a practical application, it can be used to sell API requests for digital cash (crypto-currency) on the Internet. See the detailed description in this medium article.

Concept

The gateway is part of a larger concept called Payper that deals with peer-to-peer (disintermediated) payment processing for APIs. Payper is a toolset that aims to bring together crypto-currency micropayments and APIs (web services in general) in order to allow open trading of digital resources on the Internet.

Installation

Payper Gateway works as a backend java-based component, so it is no different than running an usual JVM based service. Until it is going to be available as a docker image or a fully executable jar in a release, it is necessary to compile and package in order to run it.

Prerequisites

  • Java SDK 10 (or newer)
  • Maven 3.5+

Dependencies

Payper Gateway uses Hedera Java SDK as a dependency that is not yet available in a maven repo. That is why it is necessary to install Hedera SDK separately.

git clone git@github.com:hashgraph/hedera-sdk-java.git
cd hedera-sdk-java
mvn install

Build and Run

  1. Change dir into payper-gateway and build it:
mvn package
  1. Configure your pricelist. As an example, refer to application-price-list.yaml. Create a file called exactly like that, application-price-list.yaml in your current directory.

  2. Run the Payper Gateway jar from your current directory:

java -jar target/gateway-0.0.1-SNAPSHOT.jar

Test It

Open one of the configured URL in a browser. You will be prompted to make a payment in order to get access to the requested resource. The details on how to make the payment are listed in the Payment Required page.

Implementation

This component basically integrates Hedera Hashgraph payment verification into an extension of Spring Cloud Gateway.

See this article for more information about how the project started and the plans for future.

About

API Routing Gateway with Hedera Hashgraph micro-payment verification

License:Apache License 2.0


Languages

Language:Java 71.4%Language:HTML 28.6%