Download the PHP package srustamov/laravel-azericard without Composer

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

Azericard Payment Package for Laravel

English · Azərbaycanca

GitHub license

Latest Stable Version

Requirements

Package PHP Laravel
^4.0 ^8.2 12.x 13.x
^3.0 >=8.0 10.x 11.x 12.x
^1.0 <8.0 < 8.x

Laravel 11 is not supported: every 11.x release carries unpatched security advisories and Composer refuses to install it.

Installation

Publish the config file:

Generating the keys

Azericard requires an RSA 2048 key pair in PEM format. The package ships a command that creates one:

It writes <merchant>_private_key.pem (mode 0600) and <merchant>_public_key.pem into storage/app/azericard. Options:

Option Default Purpose
--path= storage/app/azericard Output directory
--name= configured MERCH_NAME File name prefix
--bits= 2048 Key size, 2048 is the minimum
--force — Replace existing keys, asks first

Three keys are involved and they are easy to mix up:

Key Who makes it Where it goes
Merchant private you AZERICARD_PRIVATE_KEY, signs requests
Merchant public you sent to Azericard
Azericard public the bank AZERICARD_PUBLIC_KEY, verifies callbacks

The public key this command generates does not go into AZERICARD_PUBLIC_KEY — that variable holds the key Azericard gives you.

Once Azericard has registered your public key, regenerating the pair makes every request fail signature verification. --force asks for confirmation before overwriting.

The equivalent openssl commands, if you would rather run them by hand:

Configuration

Everything is driven by environment variables:

Both key values accept either an absolute file path or the inline PEM contents, so keys can live in a secret manager instead of on disk.

Set AZERICARD_PUBLIC_KEY. When it is empty the callback signature is not verified and any caller who knows your callback URL can forge a successful payment.

AZERICARD_VERIFY_SSL defaults to true and should stay that way — this is a payment endpoint.

Usage

createOrder() returns the payload for an auto-submitting form:

Completing an order

Refund and reversal

Azericard has two reversal types: 22 (online) while the transaction has not settled yet, and 24 (offline) once it has. refund() picks between them with a 24-hour heuristic on created_at.

Enums

Card storage and recurring payments

All token flows post to /token/cgi_link and are reached through token().

Store a card while taking a payment (spec 6.1) — render the returned payload as a form, exactly like createOrder():

The callback then carries TOKEN and CARD alongside the usual fields:

Pay with a stored card (spec 6.2 / 6.3):

Recurring — registration (spec 7.1 / 7.3). Both return a form payload; the callback additionally carries EXT_NET_REF, which you must store next to the token:

Recurring — charging. These are merchant initiated, so there is no browser redirect: they are sent server to server and return bool (or throw FailedTransactionException):

A successful charge dispatches TokenCharged.

Production token endpoint. The published specification only documents the test URL (https://testmpi.3dsecure.az/token/cgi_link). This package assumes the production URL follows the same pattern (https://mpi.3dsecure.az/token/cgi_link) — confirm it with the bank before going live.

Events

Event Dispatched
OrderCreating before the payment form payload is signed
OrderCreated after the payload is built
OrderCompleted after a successful capture (TRTYPE 21)
OrderRefunded after a successful reversal (TRTYPE 22/24)
TokenCharged after a successful MIT charge (TRTYPE 1/3)

Long-running workers

TIMESTAMP and NONCE are generated when the instance is resolved. Under Octane or in a queue worker, refresh them before each transaction:

Example

Routes

Controller

Testing

Fake the gateway so nothing leaves your test suite:

Upgrading

See UPGRADE.md for the 3.x → 4.0 migration.

Credits

License

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


All versions of laravel-azericard with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
ext-json Version *
ext-openssl Version *
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.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 srustamov/laravel-azericard contains the following files

Loading the files please wait ...