Download the PHP package bryceandy/laravel-beem without Composer

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

Beem package for Laravel apps

Actions Status Total Downloads Latest Stable Version License

This package enables Laravel developers to integrate their websites/APIs with all Beem API services

Table of Contents

Installation

Pre-installation requirements

Then proceed to install

Configuration

To access Beem's APIs, you will need to provide the package with access to your Beem API Key and Secret Key.

For this we need to publish the package's configuration file using:

After you have created a Beem vendor account and obtained the keys on the dashboard, add their values in the .env variables

Usage

1. SMS

To send an SMS message, use the Beem facade and pass the message and recipients as arguments

Optionally, you can include your custom sender name only if the request has been accepted on your vendor dashboard.

The default sender name is 'INFO'.

For scheduled SMS, you can use a datetime value or Carbon\Carbon instance, but make sure the timezone is GMT+0

You can also check the remaining SMS balance using

SMS Delivery Reports

If you have specified a callback URL in the account profile, you can use that route in any way.

Optionally, this package comes with:

Collecting the delivery data

To use the event above, assign a listener in the App\Providers\EventServiceProvider

After you create the listener class, you can use Beem's delivery report

Fetching SMS sender names on your vendor account

New sender names can be requested through the API as well. Follow Beem guidelines on sender name formats

SMS templates

The following can be used to view all SMS templates for the vendor

New SMS templates can also be added:

SMS templates can be edited or deleted if you have their template_id

Two-Way SMS

After requesting a number on the SMS dashboard, you will have to edit it to assign a callback URL.

You can use the given route in any way, but this package comes with:

Collecting the outbound sms data

Assign an event listener for the event above in the EventServiceProvider

Then after creating the listener, you can collect the sms data and send a reply

2. Contacts

List all address books

Use the following to add a new address book

Address books can be edited or deleted if you have their addressbook_id

List contacts of a specific address book. Optionally filter by first name, last name or mobile number

Adding a new contact to an address book requires a mobile number and, an array of address book IDs. Other fields are optional;

Contacts can be edited by the contact_id. Other required fields are address book IDs and the mobile number.

Lastly, a contact can be deleted by specifying the contact_id and their addressbook_id

3. USSD

In a USSD app, Beem will send data to the callback URL you have specified in the USSD dashboard.

This package comes with an optional implementation that provides:

Collecting USSD callback data

Assign an event listener for the event above in the EventServiceProvider

Then in the listener class ProcessUssdCallback, you can collect the data for processing

Checking the USSD balance

4. Airtime

Start by sending airtime when you have sufficient funds on the airtime dashboard

Airtime callback success

If you have defined a callback URL in the airtime dashboard profile, Beem will send data once the transaction is completed.

Optionally, you can use a callback implementation of this package which provides:

Collecting airtime callback data

Use the event above and assign a new listener in the App\Providers\EventServiceProvider

Then after creating the App\Listeners\ProcessAirtimeCallback class, fetch the callback data

Querying airtime transaction status

Check the status of a recharge request. Use the transaction_id obtained from the ->json() response of the request.

Checking the airtime balance

5. Payment Collection

This package comes with another callback implementation for the payment collection. Available to you is:

Collecting payment collection callback data

Using the event above, create a listener to handle the callback and assign them in the App\Providers\EventServiceProvider

Then after creating the listener class App\Listeners\ProcessPaymentCollection, fetch the data you need

Checking the payment collection balance

6. Payment Checkout

The package provides an eloquent functionality to handle Beem's payment checkout by redirection.

Collect the required data and use the redirect facade anywhere in your controller or classes;

Payment checkout callback

This package comes with another callback implementation for the payment checkout. Available to you is:

Collecting payment checkout callback data

Using the event above, create a listener and assign it in the App\Providers\EventServiceProvider

Then after creating the listener class App\Listeners\ProcessPaymentCheckout, fetch the data you need

7. Disbursements

To send payments by disbursements, use the facade with appropriate arguments

8. OTP

To request a pin, you require the user's number and, the app ID that you created on the OTP dashboard.

To verify that the user sent the correct PIN, you will send a pinID from the response of the request and, the PIN the user sent.

Debugging Tips

To debug the Bryceandy\Beem\Facades\Beem facade

License

MIT license

Contributing

If you spot any bugs or want to add a feature, feel free to send a detailed PR with working tests to improve the project


All versions of laravel-beem with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-curl Version *
guzzlehttp/guzzle Version ^7.3
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 bryceandy/laravel-beem contains the following files

Loading the files please wait ....