Submission for Interledger Hackathon 2024
Implement an Open Payments plugin for shopd: "Hugo compatible e-commerce plugin for the Caddy Web Server"
- Mostly static e-commerce (one executable plus static site and DB files)
- Hugo shortcodes are the application entry points
- RESTful Hypermedia API (HATEOAS with htmx)
- Self-hostable and platform independent by making use of Caddy
- Open Payments continues this theme of empowering the user and conforming to web standards. It allows "small merchants, to use payment initiation APIs directly against their customers’ payment accounts" and "improves upon existing Open Banking standards as defined in the UK, EU, and other jurisdictions"
Makes use of refactored open-payments-example (interactive grant) for Payment Redirect with Open Payments API
# Install node modules
pnpm install
# Start interactive grant,
# redirect and wait for user interaction
node redirect.js
# Continue grant
node continue.jsThese scripts are called from the Go plugin, see cgi.go
The plugin implements the PaymentRedirect interface in hooks.go
For this demo the ContinueGrant func confirm the order. Usually ProcessMsg would subscribe to webhook events. Usually the message handler listens for webhooks. For this demo the continuation is done manually after the customer interaction.
Draft: 2024-10-Interledger-Hackathon
Presentation: 2024-10-Interledger-Hackathon-2
This repo is a submodule, running the Go code requires a working shopd dev environment.
Watch the demo video
PS. If anyone would like to collaborate on the shopd beta release, please visit the site link above and click "Join Waiting List"