Download the PHP package berbix/berbix-php without Composer

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

Berbix PHP SDK

This Berbix PHP library provides simple interfaces to interact with the Berbix API.

PHP 7 or greater is required to use this API library.

Installation

You can install the library through Composer.

Usage

Constructing a client

Create a transaction

Create tokens from refresh token

Fetch transaction data

Reference

Client

Methods

constructor(string $apiSecret, array $opts)

Supported options:

createTransaction(array $options): Tokens

Creates a transaction within Berbix to initialize the client SDK. Typically after creating a transaction, you will want to store the refresh token in your database associated with the currently active user session.

Supported options:

createHostedTransaction(array $options): array

Creates a hosted transaction within Berbix. Typically after creating a transaction, you will want to store the refresh token in your database associated with the currently active user session.

Supported options:

Returns an associative array with the following values:

fetchTransaction(Tokens $tokens): array

Fetches all of the information associated with the transaction. If the user has already completed the steps of the transaction, then this will include all of the elements of the transaction payload as described on the Berbix developer docs.

refreshTokens(Tokens $tokens): void

This is typically not needed to be called explicitly as it will be called by the higher-level SDK methods, but can be used to get fresh client or access tokens.

validateSignature(string secret, string body, string header): bool

This method validates that the content of the webhook has not been forged. This should be called for every endpoint that is configured to receive a webhook from Berbix.

Parameters:

deleteTransaction(Tokens $tokens): void

Permanently deletes all submitted data associated with the transaction corresponding to the tokens provided.

updateTransaction(Tokens $tokens, array $parameters): array

Changes a transaction's "action", for example upon review in your systems. Returns the updated transaction upon success.

Parameters:

overrideTransaction(tokens: Tokens, parameters: object): void

Completes a previously created transaction, and overrides its return payload and flags to match the provided parameters.

Parameters:

Tokens

Properties

string accessToken

This is the short-lived bearer token that the backend SDK uses to identify requests associated with a given transaction. This is not typically needed when using the higher-level SDK methods.

string clientToken

This is the short-lived token that the frontend SDK uses to identify requests associated with a given transaction. After transaction creation, this will typically be sent to a frontend SDK.

string refreshToken

This is the long-lived token that allows you to create new tokens after the short-lived tokens have expired. This is typically stored in the database associated with the given user session.

number transactionId

The internal Berbix ID number associated with the transaction.

Date expiry

The time at which the access and client tokens will expire.

Static methods

fromRefresh(string $refreshToken): Tokens

Creates a tokens object from a refresh token, which can be passed to higher-level SDK methods. The SDK will handle refreshing the tokens for accessing relevant data.


All versions of berbix-php with dependencies

PHP Build Version
Package Version
No informations.
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 berbix/berbix-php contains the following files

Loading the files please wait ....