Download the PHP package buckaroo/laravel without Composer

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

Laravel Logo

Laravel Buckaroo Payment Integration


Table of Contents


Introduction

Welcome to the Laravel Buckaroo Payment Integration package! This package offers a seamless integration of Buckaroo payment services into your Laravel application, enabling you to handle payments, refunds, captures, and authorization cancellations effortlessly.

The package is designed to be highly customizable, allowing developers to override and extend functionalities based on their requirements, making it flexible and adaptable for various use cases.


Prerequisites

Ensure you have the following requirements before proceeding:


Installation

Follow these steps to install and set up the Laravel Buckaroo Payment Integration package.

Step 1: Install the Package

Use Composer to install the package:

composer require buckaroo/laravel

Step 2: Publish Configuration and Assets

Publish the package's configuration and assets using Artisan:

php artisan vendor:publish --provider="Buckaroo\Laravel\BuckarooServiceProvider"

This command will create configuration, migration, and route files in your Laravel project.

Step 3: Run Migrations

Execute the migrations to set up the required database tables:

php artisan migrate

Step 4: Obtain Your Website and Secret Keys

To integrate Buckaroo, you’ll need your Website Key and Secret Key. Obtain these from your Buckaroo account:

Step 5: Configure Environment Variables

Add the following environment variables to your .env file:

BPE_WEBSITE_KEY=your_website_key
BPE_SECRET_KEY=your_secret_key
BPE_MODE=test or live

These settings allow the Buckaroo Client to initialize automatically during your application’s boot process.


Configuration

The package offers a variety of configuration options to suit different use cases.

Transaction Model Override

By default, the package uses the BuckarooTransaction model to handle transactions. However, if you want to override this with your custom model, you can configure it in config/buckaroo.php:

'transaction_model' => YourCustomTransactionModel::class,

The default value is:

'transaction_model' => Buckaroo\Laravel\Models\BuckarooTransaction::class,

This allows you to maintain control over transaction handling and extend the functionality as needed.

Customizing Routes

The package provides predefined routes for handling payment operations. If you prefer to customize these routes, you can configure the following options in config/buckaroo.php:

'routes' => [
    'load' => env('BPE_LOAD_ROUTES', true),
    'prefix' => env('BPE_ROUTE_PATH', 'buckaroo'),
],

By adjusting these settings, you have full control over the routing structure in your application.


Usage

Initializing the Buckaroo Client

The Buckaroo client can be initialized automatically using the .env variables or manually if needed:

use Buckaroo\Laravel\Facades\Buckaroo;
use Buckaroo\Transaction\Config\DefaultConfig;

Buckaroo::api()->setBuckarooClient(
    new DefaultConfig(
        websiteKey: config('buckaroo.website_key'),
        secretKey: config('buckaroo.secret_key'),
        mode: config('buckaroo.mode'),
        returnURL: route('buckaroo.return'),
        pushURL: route('buckaroo.push'),
    )
);

Starting a Payment Transaction

You can initiate a payment transaction using the PayService and PaymentMethodFactory.

Using Payload Array

use Buckaroo\Laravel\Api\PayService;
use Buckaroo\Laravel\Handlers\PaymentMethodFactory;

$paymentSessionService = PayService::make(
    PaymentMethodFactory::make('noservice')->setPayload([
        'currency' => 'EUR',
        'amountDebit' => 100,
        'order' => '000-ORD',
        'invoice' => '000-INV',
        'description' => 'This is a description',
        'continueOnIncomplete' => '1',
        'servicesSelectableByClient' => 'ideal,bancontactmrcash',
    ])
);

Using Setter Methods

$paymentSessionService = PayService::make(
    PaymentMethodFactory::make('noservice')
        ->setCurrency('EUR')
        ->setAmountDebit(100)
        ->setOrder('000-ORD')
        ->setInvoice('000-INV')
        ->setDescription('This is a description')
        ->setContinueOnIncomplete('1')
        ->setServicesSelectableByClient('ideal,bancontactmrcash')
);

Direct Usage with Buckaroo Wrapper

You can interact directly with the Buckaroo API using the built-in wrapper for greater control and flexibility:

use Buckaroo\Laravel\Facades\Buckaroo;

$response = Buckaroo::api()->method('{SERVICE_CODE}')->{ACTION}([
    'currency' => 'EUR',
    'amountDebit' => 100,
    'order' => '000-ORD',
    'invoice' => '000-INV',
    'description' => 'This is a description',
]);

Example for an iDEAL payment:

$response = Buckaroo::api()->method('ideal')->pay([
    'currency' => 'EUR',
    'amountDebit' => 100,
    'order' => '000-ORD',
    'invoice' => '000-INV',
    'description' => 'Payment for Order 000-ORD',
]);

Other Services

The package provides additional services with similar logic:

These services follow the same structure as PayService and can be used similarly to manage various payment actions.


Additional Information


Contributing

We welcome contributions! Please follow our Contribution Guidelines when contributing to the project.


Versioning

Versioning

We use Semantic Versioning:


Support

For support, reach out via:


License

Laravel Buckaroo Wrapper is open-source software licensed under the MIT license.


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
buckaroo/sdk Version ^1.10.0
laravel/framework Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.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 buckaroo/laravel contains the following files

Loading the files please wait ....