Download the PHP package btcpayserver/btcpayserver-greenfield-php without Composer

On this page you can find all versions of the php package btcpayserver/btcpayserver-greenfield-php. 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 btcpayserver-greenfield-php

BTCPay Server Greenfield API PHP client library

This library makes it easier to integrate BTCPay Server in your PHP application.

Approach

This library takes an opinionated approach to Greenfield API with the aim of making your developer life as easy and convenient as possible. For this reason, we have decided to structure arguments a bit differently, but still allow full and advanced use cases.

The general reasoning behind the arguments an API client takes are in this order:

Methods that return a Unix timestamp always end with Timestamp like getReceivedTimestamp() to avoid format and timezone confusion. These are always in seconds (not milliseconds).

Features

TODO

How to use with composer

If you use some framework or other project you likely are ready to go. If you start from scratch make sure to include Composer autoloader.

How to use without composer (not recommended)

In the src directory we have a custom autoload.php which you can require and avoid using composer if needed.

Best practices

FAQ

Where to get the API key from?

The API keys for Greenfield API are not on the store level "Access Tokens" anymore. You need to go to your account profile: "My Settings" (user profile icon) -> "API Keys" instead. You can even redirect the users to generate the API keys there.

Contribute

We run static analyzer Psalm and PHP-CS-fixer for codestyle when you open a pull-request. Please check if there are any errors and fix them accordingly.

Codestyle

We use PSR-12 code style to ensure proper formatting and spacing. You can test and format your code using composer commands. Before doing a PR you can run composer cs-check and composer cs-fix which will run php-cs-fixer.

Greenfield API coverage

Currently implemented functionality is tracked in this sheet and will be updated sporadically. Check to see which areas still need work in case you want to contribute.


All versions of btcpayserver-greenfield-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-curl Version *
ext-json Version *
ext-mbstring Version *
ext-bcmath Version *
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 btcpayserver/btcpayserver-greenfield-php contains the following files

Loading the files please wait ....