Download the PHP package stack-pay/payments-sdk-php without Composer

On this page you can find all versions of the php package stack-pay/payments-sdk-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 payments-sdk-php

Stack Pay™ - Payments SDK for PHP

Total Downloads Latest Stable Version License

The Stack Pay Payments SDK for PHP is an open source library through which your PHP application can easily interact with the Stack Pay API.

Note: This release utilizes Stack Pay API v1. There are substantial differences between this version of the client library and subsequent versions. Please be mindful of this when upgrading.

Requirements

PHP 5.4.0 (or higher)

Dependencies

PHP Curl Class 7.2.0 (or higher)

This library also requires 'ext-curl': '*'.

Installation

Composer (recommended)

It is strongly recommended that you use Composer to install this package and its dependencies. Some methods utilize GuzzleHttp. If you do not install via Composer, these methods will be difficult to use.

To install via Composer, run the following command:

You can also manually add this dependency to your composer.json file:

To use the bindings, use Composer's autoload:

Manual Installation (not recommended)

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the payments-sdk.php file.

You will also need to download the dependencies and manually include them, which can be extremely cumbersome. It is strongly recommended that you use Composer.

Instantiating the SDK

This will create a StackPay class instance in PRODUCTION mode with USD as the default currency.

To enable development/testing mode, you should then use:

To change currency:

Documentation

Request-Focused Implementation

The examples in these docs are recommended when the SDK is installed via Composer. These methods use GuzzleHttp which is very difficult to use without a good autoloader.

You can directly interact with the response returned by these methods using the ->body() method, which is the JSON-decoded Body element of the response payload as a stdClass PHP object.

You can check the response for success using method success(). If success() returns false, then you can use error() to access code, messages, and errors attributes.

Development

Install dependencies:

Tests

Install dependencies as mentioned above (which will resolve PHPUnit), then you can run the test suite:

If you plan to use these tests, it is highly recommended that you familiarize yourself with PHPUnit as well as the phpunit.xml configuration file included with this package.

Support

Contributing Guidelines

Please refer to CONTRIBUTING.md (coming soon)


All versions of payments-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
php-curl-class/php-curl-class Version ^7.4.0
guzzlehttp/guzzle Version ^6.3
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 stack-pay/payments-sdk-php contains the following files

Loading the files please wait ....