Download the PHP package jack-walter-smith/bepaid-laravel without Composer

On this page you can find all versions of the php package jack-walter-smith/bepaid-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 bepaid-laravel

BePaid Laravel

bepaid-laravel

Build Status Codecov branch

A wrapper of BeGateway for Laravel (unofficial)

Documentation

Requirements

PHP >=7.1

Laravel >= 5.7

Installation

php artisan vendor:publish --provider="JackWalterSmith\BePaidLaravel\Providers\BePaidServiceProvider"

Usage

Basics

All you need to do is to create a new DTO and fill out original object with provided values.

Here is a simple example:

The table bellow illustrates which object in BeGateway equals to object in BePaid Laravel. All of these objects in BePaid Laravel package, that listed below, have public field $operation, which gives you access to original object. This is in case if package features are not enough to reach goal. You can check original package to see all available methods.

BeGateway BePaid Laravel Facade DTO
AuthorizationOperation Authorization Authorization AuthorizationDto
CardToken CardToken CardToken CardTokenDto
PaymentOperation Payment Payment PaymentDto
GetPaymentToken PaymentToken PaymentToken PaymentTokenDto
Product Product Product ProductDto
QueryByPaymentToken Query Query QueryByPaymentTokenDto
QueryByTrackingId Query Query QueryByTrackingIdDto
QueryByUid Query Query QueryByUidDto
RefundOperation Refund Refund RefundDto
CreditOperation Credit Credit CreditDto
CaptureOperation ChildTransaction ChildTransaction CaptureDto
VoidOperation ChildTransaction ChildTransaction VoidDto

A few words about Query and ChildTransaction objects. They are also have $operation public field, but there are nuances. It depends on which DTO you will pass to fill() or submit() method. So let's say you want to query for transaction by uid, in this case you'll create a new QueryByUidDto([...]), then $operation field becomes instance of \BeGateway\QueryByUid.

Subscribe to events

BePaid Laravel provides preconfigured routes that can be used in requests. Below is the list of it:

Method Path Name Middleware Event
POST /bepaid/notifications bepaid.notifications bepaid.inject_basic_auth bepaid.event.notification.success | bepaid.event.notification.fail
GET /bepaid/success bepaid.success - bepaid.event.success
GET /bepaid/decline bepaid.decline - bepaid.event.fail
GET /bepaid/fail bepaid.fail - bepaid.event.return
GET /bapaid/cancel bepaid.cancel - bepaid.event.cancel
GET /bepaid/return bepaid.return - bepaid.event.decline

The most important is notifications. BePaid Laravel already validates if the incoming request was sent by BePaid. In success validation scenario it will fire bepaid.event.notification.success and bepaid.event.notification.fail if something went wrong.

How to handle all this stuff?

BePaid Laravel ships with abstract class BePaidSubscriber which you need to extend.

Create and register a new Event Subscriber:

Now just extend BePaidSubscriber and define all required methods. That's it.


All versions of bepaid-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
laravel/framework Version ^5.7|^6|^7|^8
begateway/begateway-api-php Version dev-master as dev-3ceb96c
myclabs/php-enum Version dev-master
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 jack-walter-smith/bepaid-laravel contains the following files

Loading the files please wait ....