Download the PHP package airtimerewards/ar-connect-sdk without Composer

On this page you can find all versions of the php package airtimerewards/ar-connect-sdk. 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 ar-connect-sdk

Packagist Packagist

AR Connect SDK

This package offers a client for interacting with AR Connect.

1. Requirements

This SDK requires PHP 7.1 or later. Additionally you must be registered with AR Connect to be able to use an API. Finally, you will need an environment set up and an API key for that environment.

2. Installation

The recommended installation is to use composer, and run the command:

3. Usage

The AR Connect client provides methods for interacting with the AR Connect API.

3.1 Instantiating a client

To instantiate a client, use the factory method and pass in your environment ID and API key.

Important: The API key must be for the environment that has been specified. Errors will occur if they do not match.

3.2 Retrieving Data to Make a Credit

Before making a credit you need to find some information about the account for which the credit is being applied: the mobile phone network and whether it's a pay-as-you-go (prepaid) or a monthly contract (postpaid). This can be done by calling the getNetworks() method. This method accepts an optional MSISDN (international standard mobile phone number with the country-code prefix) getNetworks('447700900000') which when passed, will return only networks applicable to that mobile account.

Once the network has been selected, you can get information about what credit types are supported for this network. The credit types contain information about the minimum, maximum and increments of credit values available.

All the information required to apply a credit has now been collected.

3.3 Applying a credit

A credit can be applied by calling the createCredit() method with the following information:

An instance of AirtimeRewards\ARConnect\Credit will be returned. It is recommended that the ID of the credit is stored so that it can be used for reference and retrieval at a future date (e.g. for checking the latest status of the credit).


All versions of ar-connect-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
guzzlehttp/guzzle Version ^6.0 || ^7.0
moneyphp/money Version ^3.0 || ^4.0
psr/log Version ^1.0 || ^2.0 || ^3.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 airtimerewards/ar-connect-sdk contains the following files

Loading the files please wait ....