Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.41 KB

File metadata and controls

54 lines (41 loc) · 1.41 KB

MakePay Contentful App

Contentful App Framework integration for creating MakePay payment links from Contentful entries.

What It Does

  • Adds a Contentful app configuration screen for MakePay relay settings.
  • Adds entry sidebar and field-location UI for creating payment links.
  • Reads title and amount from configured entry fields.
  • Writes the resulting payment link into the current field when used as a field app.
  • Includes a Node relay example that stores MakePay credentials server-side.

Security Model

Contentful apps run in an editor browser session. This app never asks for or stores MakePay key secrets in Contentful. It calls a merchant-controlled relay endpoint, and that relay sends authenticated requests to MakePay.

Installation

  1. Build the app with npm run build.
  2. Upload dist/ as a Contentful hosted app bundle or host it yourself.
  3. Create a Contentful app definition pointing to the hosted URL.
  4. Enable the app for entry sidebar and short-text field locations.
  5. Configure:
    • Relay endpoint.
    • Default currency.
    • Title field ID.
    • Amount field ID.
    • Return URL.

Relay

The example relay lives in examples/node-relay.

MAKEPAY_KEY_ID=...
MAKEPAY_KEY_SECRET=...
node examples/node-relay/server.mjs

The relay accepts the app payload and creates MakePay payment links using the Partner API.

Development

npm ci
npm test
npm run build
npm run validate