Download the PHP package tomise/laravel-barion without Composer

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

A simple Laravel package for Barion Smart Gateway

Connect your webshop to the Barion Smart Gateway in just 5 minutes.

Development currently in progress!

Tomise/Laravel-Barion is provides an easy way to use the Barion API with Laravel applications.Support Barion Smart Gateway operation and Barion Wallet operations.

Installation

  1. Install the package using composer:

composer require tomise/laravel-barion

  1. Register the service provider in the app.php config file

  2. Publish config file (optional)

Configuration

Package has a pre-configuration, but you set some data your .env file: Configuration details in config/barion-gateway.php

If your BARION_ENVIRONMENT variable value is "test" every request send to sandbox server.

Documentation for Smart Gateway

There are 2 ways to use the BarionGateway (model options only available for payment start operation).

Usage with models

The $barion_casts property should be a key-value pair based array, the keys are given and the values are the fields of the model you want to pass to the Barion.

If you want to use Barion with your models only needs some simple step:

  1. Add public $barion_casts = [] you Order or Cart or any class that extends from Model.

    1. Required keys: payment_request_id, payer_hint, order_number, phone_number, total

Example

  1. Add public $barion_casts = [] you OrderItem or CartItem or any class that also extends from Model.
    1. Required keys: name, description, quantity, unit, unit_price, item_total

If you want to use this version, but you are missing one or more properties of a model, just attach it before passing it to the startPayment method or you can create a custom model directly for Barion e.g.: BarionOrderModel

Start single payment

startPayment method only assign minimal data to Payment/Start endpoint. But if you want to add some extra data just set before you call the sendSinglePayment.

Example

Different Locale and Currency

If you want to use the "model option" but are missing the locale or the currency from your "order" model, you can simply overwrite the default values.

Important: Changing the currency does not automatically convert the values, please note this!

Simple manual usage

Payment Start

In this case you will get an empty "PreparedPaymentService" object where you can set everything. The POSKey is automatically attached to the object.

Get Payment Status

Cancel Authorization

Information

Available gateway endpoints:

Available Locales: https://docs.barion.com/Localisation

Available Currencies:https://docs.barion.com/Supported_currencies

Documentation for Barion Wallet

Barion Wallet documentation

Examples

License

Laravel-Barion is open source software licensed under the MIT License.


All versions of laravel-barion with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.0
illuminate/database Version >=7.0
illuminate/support Version >=7.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 tomise/laravel-barion contains the following files

Loading the files please wait ...