Laravel Package for 1APP. Learn how to integrate our APIs to build a web or mobile integration to send and accept payments for your application and businesses.

Overview

1APP Laravel Library

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Learn how to integrate our APIs to build a web or mobile integration to accept payments, make payment of Bills and as well custom integration for your application and businesses. On this page, we'll go over some payment services we offer to give you a quick overview of what is obtainable with 1app.


## Installation
 composer require oneapp/oneapp

Configuration

You can publish the configuration file using this command:

 php artisan vendor:publish --provider="Oneapp\Oneapp\OneappServiceProvider"

A configuration-file named oneapp.php with some sensible defaults will be placed in your config directory:

 <?php 

 return [

    /**
    * The secret key from 1app Dashboard
    */

    'secretKey' => getenv('ONEAPP_SECRET_KEY'),

    /**
    * the public key from 1app Dashboard
    */

    'publicKey' => getenv('ONEAPP_PUBLIC_KEY'),

    /**
     * 1app Payment gateway url
     */

    'baseUrl' => getenv('ONEAPP_PAYMENT_URL'),
 ];

# Usage

Open your .env file and add your public key, secret key, payment url like so:

   ONEAPP_SECRET_KEY=
   ONEAPP_PUBLIC_KEY=
   ONEAPP_PAYMENT_URL=https://api.1app.online/v1

If you are using a hosting service like heroku, ensure to add the above details to your configuration variables.


Bills

Instantiate 1app

   $oneapp = new Oneapp();

Check Account Balance

   $oneapp->checkBalance();

Send Money

  //defined request types
  $moneypayload = [
     'amount' => '', //string
     'bankcode'=> '', //string
     'bankname'=> '', //string
     'reference'=> '', //string
     'accountno'=> '', //string
     'narration'=> '', //string
     'currency'=> '', //string
     'acctname'=> '' //string
  ];
  
  $oneapp->sendMoney(array $moneypayload);

  //sample request
  $moneypayload = [
     'amount' => '100',
     'bankcode'=> '000013',
     'bankname'=> 'GT BANK',
     'reference'=> 'shudgyutg876542',
     'accountno'=> '0245000000',
     'narration'=> 'Transfer to client',
     'currency'=> 'NGN',
     'acctname'=> 'John Doe'
  ];

Data Plans

Get Data List for the provided Provider

   //providers 'MTN' || 'GLO' || 'AIRTEL' || '9MOBILE'
   $ntwk = 'MTN';
   $oneapp->dataPlans($ntwk);

Purchase Data Bundle

   //defined request types
   $dataB = [
      'datacode' => '', //string
      'network_id' => '', //string
      'phoneno' => '', //string
      'reference' => '' //string
   ];
   
   $oneapp->dataBundle(array $dataB);

   //sample request
   // Network ID - GLO = 1, MTN = 2, AIRTEL = 3, 9MOBILE = 4
   $dataB = [
      'datacode' => '1000',
      'network_id' => '2',
      'phoneno' => '07012345678',
      'reference' => 'DJIEJ2MEUE2EN34'
      ];

Purchase Airtime

   $phoneDet = [
      'phoneno' => '', //string
      'network_id' => '', //string
      'reference' => '', //string
      'amount' => '' //string
   ];
   $oneapp->airtime($phoneDet);

   //Sample Request
   // Network ID - GLO = 1, MTN = 2, AIRTEL = 3, 9MOBILE = 4
   $phoneDet = [
      'phoneno' => '07012345678',
      'network_id' => '2',
      'reference' => 'O4I3U8SRNYOIYT',
      'amount' => '100'
   ];

Verify Electricity

   $electDet = [
      'meterno' => '', //string
      'provider' => '', //string
    ];
   $oneapp->verifyElectricity($electDet);

   //Sample Request
   $electDet = [
      'meterno' => '78632746282',
      'provider' => 'KANO',
   ];

Buy Electricity

   $vendDet = [
      'meterno' => '', //string
      'metername' => '', //string
      'provider' => '', //string
      'amount' => '', //string
      'vendtype' => '', //string
      'reference' => '' //string
   ];
   $oneapp->vendElect($vendDet);

   $vendDet = [
      'meterno' => '67537283728',
      'metername' => 'JOHN DOE',
      'provider' => 'KANO',
      'amount' => '100',
      'vendtype' => 'PREPAID',
      'reference' => 'O4I3U8SRNYOIYT'
   ];

Get Cable TV Lists

Get Cable TV List for the provided Provider

   //providers 'DSTV' || 'GOTV' || 'STARTIMES'
   $tv = 'STARTIMES';
   $oneapp->getCableTV($tv);

Verify IUC

      $iuc = ''; //string
      $type = ''; //string
      $oneapp->verifyCable($type, $iuc);

      //Sample Request
      $iuc = '87675656325',
      $type = 'DSTV'

Purchase Cable TV

   $buyCable = [
         'tvno' => '', //string
         'tv' => '', //string
         'custname' => '', //string
         'custno' => '', //string
         'amount' => '', //string
         'reference' => '' //string
     ];
     $oneapp->buyCableTV($buyCable);
     
     
     //sample request
   $buyCable = [
      'tvno' => '87675656325',
      'tv' => 'DSTV',
      'custname' => 'JOHN DOE',
      'custno' => '171747582',
      'amount' => '50',
      'reference' => 'OI8UYTEFYDTYTG7'
     ];

Get Bank Lists

   $oneapp->getBankList();

Payments

Initialize Payments

   $trans = [
      'amount' => '', // string,
      'fname' => '', // string,
      'lname' => '', // string,
      'customer_email' => '', // string,
      'phone' => '', // string,
      'reference' => '', // string,
      'currency' => '', // string,
      'redirecturl' => '', // string
   ];
   $oneapp->initTrans($trans);

   //sample request
   $trans = [
      "amount"=> '1000',
      "fname"=> 'John',
      "lname"=> 'Doe',
      "customer_email"=> '[email protected]',
      "phone"=> '0801234567789',
      "reference"=> 'OI8UYTEFYDTYTG7',
      "currency"=> 'NGN', //NGN or USD supported for now
      "redirecturl"=> 'https://mywebsite.com'
   ];

Verify transaction

   $reference = ''; //string
   $oneapp->verifyTrans($reference);

   //sample request
   'reference' = 'OI8UYTEFYDTYTG7';

Transaction Lists

//Get Transaction List
   $oneapp->transList();

Get Transaction Details

   $reference = ''; //string
   $oneapp->getTrans($reference);

   //sample request
   'reference'=> 'OI8UYTEFYDTYTG7';

Get Customers

   $oneapp->getCusts();

Get Payouts / Settlements

   $oneapp->payouts();

Get Payouts / Settlements Transactions

   $reference = ''; //string
   $oneapp->getPayoutTrans($reference);

   //sample request
   'reference'=> 'OI8UYTEFYDTYTG7';

Disputes

   $oneapp->disputes();

Accept Disputes

         $accept = [
            'sesscode' => '',  //string,
            'userid' => '', // int,
            'businessid' => '',  //int,
            'disputeid' => '', // int,
            'transref' => '', // string,
            'customername' => '', // string,
            'customeremail' => '',//  string,
            'customerphone' => '', // string,
            'dclaim' => '', // string,
            'torefund' => '', // int,
        ];
        
   $oneapp->acceptDispute($accept);

   //sample request
         $accept = [
            'sesscode' =>  '123456',
            'userid' =>  1,
            'businessid' =>  2,
            'disputeid' =>  1,
            'transref' =>  'OI8UYTEFYDTYTG7',
            'customername' =>  'John Doe',
            'customeremail' =>  '[email protected]',
            'customerphone' =>  '09034568931',
            'dclaim' =>  'shoe purchase', //service offered
            'torefund' =>  10000, //amount to refund
        ];

Decline Disputes

      $decline = [
            'sesscode' => '', //string
            'userid' => '', //string
            'businessid' => , //int
            'disputeid' => , //int
            'txref' => '', //string
            'name' => '', //string
            'email' => '', //string
            'phone' => '', //string
            'claim' => '', //string //service offered
            'descres' => '', //string //decline reason
            'receipt' => '', //string  //evidence of decline, File Upload
        ];
   $oneapp->rejectDispute($decline);

   //sample request
      $decline = [
            'sesscode' => '12345',
            'userid' => '1234',
            'businessid' => 3,
            'disputeid' => 3,
            'txref' => 'OI8UYTEFYDTYTG7',
            'name' => 'John Doe',
            'email' => '[email protected]',
            'phone' => '080XXXXXX98',
            'claim' => 'shoe purchase', //service offered
            'descres' => 'no error in transaction', //decline reason
            'receipt' => 'receipt.jpeg', //evidence of decline, File Upload
        ];

Wallet


Create Wallet

      $details = [
            'apptoken' => '', //string
            'fname' => '', //string
            'sname' => '', //string
            'email' => '', //string
            'phoneno' => '', //string
            'auth' => '', //string
            'referby' => ''
        ];

   $oneapp->createWallet($details);
   
   //Sample Request
   $details = [
            'apptoken' => 'APPID',
            'fname' => 'testname',
            'sname' => 'testsurname',
            'email' => '[email protected]',
            'phoneno' => '08000000000',
            'auth' => 'D@tqj8265',
            'referby' => ''
        ];

1app Web Documentation

Credits

License

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

You might also like...
SendGrid's PHP HTTP Client for calling APIs
SendGrid's PHP HTTP Client for calling APIs

Quickly and easily access any RESTful or RESTful-like API. If you are looking for the SendGrid API client library, please see this repo. Announcements

OVHcloud APIs lightweight PHP wrapper

Lightweight PHP wrapper for OVHcloud APIs - The easiest way to use OVHcloud APIs in your PHP applications - Compatible with PHP 7.4, 8.0, 8.1 - Not affiliated with OVHcloud

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Telegram Bot API - PHP SDK Telegram Bot PHP SDK lets you develop Telegram Bots in PHP easily! Supports Laravel out of the box. Telegram Bot API is an

A framework agnostic PHP library to build chat bots
A framework agnostic PHP library to build chat bots

BotMan If you want to learn how to create reusable PHP packages yourself, take a look at my upcoming PHP Package Development video course. About BotMa

A2Reviews Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP
A2Reviews Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP

A2Reviews Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP. Including adding reviews to a store's products. It is used to import and export reviews through the API. This is the official package built and developed by A2Reviews, Inc.

Shopee Open API v2 Client build with php

Shopee PHP Client This is a Shopee PHP Client, currently supported for API V2 in ShopeeOpenPlatform Composer Install composer require haistar/shopee-p

Where we build an open source API to retrieve some data about Togo's region

🇹🇬 Subdivision administrative du Togo Base de données complète des régions, préfectures, communes, cantons et quartiers disponible au format JSON, S

Build a Telegram Bot

Build a Telegram Bot

This library is for integration with Salesforce via REST API.

xsolve-pl/salesforce-client Introduction This library is for integration with Salesforce via REST API. Licence This library is under the MIT license.

Releases(v1.0.2)
Owner
O'Bounce Technologies
O'Bounce Technologies is an innovative, formidable, and reliable IT firm in Nigeria since 2013. We are not just building apps. We are building solutions.
O'Bounce Technologies
Universal payments API SDK (UNOFFICIAL QIWI CLIENT)

Qiwi Php Client Especially for ?? Zorra Telecom and ?? Everyone else Привет Attention: At the moment the number of methods is very limited, they will

Ivan Terentev 2 Oct 25, 2022
A Laravel package to help integrate Shopware PHP SDK much more easier

Shopware 6 Laravel SDK A Laravel package to help integrate Shopware PHP SDK much more easier Installation Install with Composer composer require sas/s

Shape & Shift 16 Nov 3, 2022
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.

DeviceDetector Code Status Description The Universal Device Detection library that parses User Agents and detects devices (desktop, tablet, mobile, tv

Matomo Analytics 2.4k Jan 9, 2023
Integrate Your PHP Code With Telegram Bot API for Beginner

Documentation[https://core.telegram.org/bots/api] Resource[https://github.com/bachors/KBBI.sql] Integrate Your PHP Code With Telegram Bot API for Begi

Nova Andre Saputra 1 Oct 19, 2021
This package help you build your REST API documentation.

Laravel API Doc This package help you build your REST API documentation. Installation You can install the package via composer: composer require axeld

Axel 2 May 19, 2022
Laravel ClickHouse adds CH client integration, generation & execution of ClickHouse database migrations to the Laravel application.

Laravel ClickHouse Introduction Laravel ClickHouse database integration. This package includes generation and execution of the ClickHouse database mig

cybercog 11 Dec 20, 2022
Integrate RajaOngkir API with laravel

Baca ini dalam bahasa: Indonesia This is my package laravel-rajaongkir Installation You can install the package via composer: composer require kodepin

Kode Pintar 6 Aug 11, 2022
oursms.app client library that allows you to send SMS

Oursms laravel client https://oursms.app client library that allows you to send SMS Installation Install oursms client with composer composer requir

Khalid Mohammad 11 Aug 27, 2022
Lightweight PHP library for WhatsApp API to send the whatsapp messages in PHP provided by ultramsg.com

Ultramsg.com WhatsApp API PHP SDK Lightweight PHP library for WhatsApp API to send the whatsappp messages in PHP provided by Ultramsg.com Installation

Ultramsg 117 Dec 26, 2022
Google-api-php-client - A PHP client library for accessing Google APIs

Google APIs Client Library for PHP Reference Docs https://googleapis.github.io/google-api-php-client/main/ License Apache 2.0 The Google API Client Li

Google APIs 8.4k Dec 30, 2022