# CryptoPayr for Invision Community (Commerce)

A redirect payment gateway for Invision Community **4.x Commerce (Nexus)**:
buyers are sent to the CryptoPayr hosted checkout and the transaction is
approved from a signed webhook.

## Install
1. Copy `sources/Gateways/CryptoPayr.php` into your Commerce gateways
   (`applications/nexus/sources/Gateways/CryptoPayr.php`), or include it from a
   small plugin/app.
2. ACP → Commerce → Payments → **Payment Methods** → add a method of type
   **CryptoPayr**.
3. Enter your **API key** (Dashboard → Developers) and the API base URL.

## How it works
- On checkout the gateway calls `POST /api/v1/payment/create` and redirects the
  member to the returned `checkout_url`.
- CryptoPayr POSTs a signed webhook (`X-CryptoPayr-Signature`,
  HMAC-SHA256 of the body with your API key) which approves the transaction.

> This is a developer integration for IPS 4.x; review against your IPS version
> before production use.
