Download the PHP package barzahlen/barzahlen-php without Composer

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

viacash/Barzahlen Payment Module PHP SDK (v2.2.0)

Total Downloads License

Copyright

(c) 2016-2024, viafintech GmbH
https://www.viafintech.com

Preparation

API Credentials

The API credentials, which are necessary to use the Barzahlen API, can be received at Barzahlen Control Center. After a successful registration a division ID is assigned to you as well as a payment key.

Installation

The Barzahlen PHP SDK can be installed using Composer.

Client

The client will connect your application to the Barzahlen API v2. Initiate it with the division ID and the payment key. Set the third, optional parameter to true if you want to send your requests to the sandbox for development purpose. Optional: Set a custom user agent.

It's recommended to surround API calls with try-catch-blocks since errors are thrown as exceptions. This way they can be logged as required by the system.

The API will send you JSON as response. Use json_decode() to transform it into an object or an associative array.

Requests

There are five different requests which the client can handle for you. The required and optional parameters can be set using setters, an array or you can use a JSON string.

CreateRequest

To request a new payment or refund slip simply initiate a new CreateRequest and add the parameters. Here are three examples for a minimal payment request using setters, an array and plain json.

Payment Slips

Refund Slips

This is an example for a minimal refund request. Please note that the amount is negative and must not exceed the initial payment amount. Multiple refunds for one payment up to the initial amount are possible.

Payout Slips

This is an example for a minimal payout request.

Payout slips allow a customer to receive money and result in money being transferred from your division. They are used when paying out money that is not associated with a previous payment. When returning a portion or all of the money a customer has previously paid via Barzahlen, use refund slips.

More parameters

You may set more parameters according to the Barzahlen API v2 Documentation.

The customer data can be set as array and the expiresAt value can be a DateTime object. Also, you can use chaining with the setters.

Example Response

Representation of current slip status. (Content depends on sent parameters.)

UpdateRequest

To change slip parameters afterwards initiate a new UpdateRequest using the slip id. Use setters, an array or a json string to set your new or updated parameter(s). Only pending slips can be updated. For more information please read the Barzahlen API v2 Documentation.

The expiresAt() method can be used with a DateTime object and chaining the setters is also possible. The response will contain a json with updated information.

RetrieveRequest, ResendRequest, InvalidateRequest

The last three requests don't require any additional parameters via setters, array or json. They can be initiate with the slip id (and message type) before they're sent with the client.

RetrievePdfRequest

Retrieve the slip’s PDF representation for printing. Downloading the PDF is only possible for slips in the pending state.

Note: Due to security reasons this endpoint is disabled by default and can only be enabled by Barzahlen. Please feel free to contact us if you are interested in using this feature.

Webhook

When the state of a slip changes (e.g. the customer payed at a retail partner) and a hook url is set, Barzahlen will send a POST request to this hook url to let you know about the change. Initiate the Webhook class with the payment key and use it to verify the incoming request's header and body.

Support

The viacash Team will happily assist you with any problems or questions.

Send us an email to [email protected] or check out our Solutions center at https://www.viafintech.com/overview-solutions/.


All versions of barzahlen-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
ext-mbstring 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 barzahlen/barzahlen-php contains the following files

Loading the files please wait ....