Download the PHP package michaelhairetis/mpp without Composer

On this page you can find all versions of the php package michaelhairetis/mpp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mpp

mpp-php

PHP SDK for the Machine Payments Protocol. Pay for HTTP resources per request, with no account or API key set up in advance.

MPP is an HTTP authentication scheme (draft-ryan-httpauth-payment), so this library is built like one: no framework dependency, PSR-7/15/18 throughout.

Install

Requires PHP 8.2+.

Selling

PaymentGate issues challenges and checks credentials. It does not settle. Confirming a payment landed needs chain access, so that sits behind Verifier, which you implement.

Or drop PaymentMiddleware into a PSR-15 stack and return the price per request:

The verified Credential and Receipt land on the request as mpp.credential and mpp.receipt.

Buying

PaymentClient wraps any PSR-18 client and answers 402s. Signing lives in your Payer.

It re-pays if the server re-challenges (up to maxPayments), skips expired challenges, and picks between competing offers using the payer's own preference order rather than the server's.

Challenge binding

Challenge ids are an HMAC over the parameters they commit to, so a server can verify an echoed challenge without storing it. The construction follows the spec's recommended layout and reproduces its published test vectors.

description is deliberately outside the binding. It is display only.

What's here

Core challenge, credential, receipt, RFC 9110 auth-params, RFC 8785 JCS, RFC 9530 digests
Methods tempo / charge
Transport PSR-15 middleware, PSR-18 client decorator

Sessions, subscriptions, other methods, and the MCP transport are not implemented yet.

Development

Everything runs in a container; nothing is installed on the host.

License

Apache-2.0 or MIT, at your option.


All versions of mpp with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-mbstring Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
psr/http-server-middleware Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package michaelhairetis/mpp contains the following files

Loading the files please wait ...