Download the PHP package ghanem/dtone without Composer

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

Laravel Dtone

Latest Stable Version License Total Downloads

A package that provides an interface between Laravel and DT One DVS API.

Requirements

Installation

You can install the package via composer:

Publish the config file:

Configuration

Add the following to your .env file:

Set DTONE_IS_PRODUCTION=true when you are ready to use the production API.

Retry Configuration

You can enable automatic retries for failed requests:

This will retry failed requests up to 3 times with a 100ms delay between attempts.

Usage

You can use the Dtone facade or resolve it from the container.

Services

Countries

Operators

Products

Campaigns

Promotions

Benefit Types

Balances

Transactions

Lookups

Response DTOs

All API responses are returned as typed DTO objects. Every DTO has a toArray() method for backward compatibility:

Available DTOs: Service, Country, Operator, Product, Balance, Transaction, Campaign, Promotion, BenefitType, PaginatedResponse, Meta.

Paginated Responses

List endpoints return a PaginatedResponse DTO:

Webhooks

The package automatically registers a webhook endpoint to receive DT One transaction callbacks.

Configuration

You can also configure middleware in config/dtone.php:

Set webhook_path to null to disable the webhook route.

Events

The webhook controller dispatches the following events:

Event Dispatched when
TransactionStatusChanged Every webhook (always dispatched)
TransactionCompleted Status is COMPLETED
TransactionFailed Status is FAILED or DECLINED
TransactionConfirmed Status is CONFIRMED
TransactionCancelled Status is CANCELLED

Listen to events in your EventServiceProvider:

Each event has $payload, $status, and $transactionId properties:

Signature Verification

If DTONE_WEBHOOK_SECRET is set, the VerifyWebhookSignature middleware is available:

This verifies the X-Dtone-Signature header using HMAC-SHA256.

Laravel Notifications Channel

Send top-ups as Laravel notifications using the DtoneChannel:

DtoneMessage API

On-Demand Notifications

Caching

Discovery endpoints (services, countries, operators, products, campaigns, promotions, benefit-types) can be cached to reduce API calls:

Override TTL per endpoint:

Set DTONE_CACHE_TTL=0 (default) to disable caching. Transactions, balances, and lookups are never cached.

Clear cache programmatically:

Artisan Commands

Command Description
dtone:balance Display account balances
dtone:products List products (supports --country, --type, --service, --page, --per-page)
dtone:transaction {id?} List transactions or get details by ID
dtone:cache-clear {endpoint?} Clear DT One cache (all or specific endpoint)
dtone:health Check API connectivity, balances, and service availability

Examples:

Done

Roadmap

Testing

License

The MIT License (MIT). Please see License File for more information.


All versions of dtone with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5|^8.0
guzzlehttp/guzzle Version ^6.3|^7.0
illuminate/http Version ^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0|^12.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 ghanem/dtone contains the following files

Loading the files please wait ...