/home/kueuepay/public_html/vendor/fakerphp/faker/src/Faker/Provider/PhoneNumber.php
<?php

namespace Faker\Provider;

use Faker\Calculator\Luhn;

class PhoneNumber extends Base
{
    protected static $formats = ['###-###-###'];

    /**
     * @see https://github.com/giggsey/libphonenumber-for-php/blob/master/src/CountryCodeToRegionCodeMap.php
     * @see https://libphonenumber.appspot.com/phonenumberparser?number=%2B4576597442
     */
    protected static $e164Formats = [
        '+1##########',
        '+7##########',
        '+20##########',
        '+27##########',
        '+30##########',
        '+31##########',
        '+32#########',
        '+33#########',
        '+34#########',
        '+36#########',
        '+39##########',
        '+40#########',
        '+41#########',
        '+43##########',
        '+44##########',
        '+45########',
        '+46##########',
        '+47########',
        '+48##########',
        '+49##########',
        '+51#########',
        '+52##########',
        '+53##########',
        '+54##########',
        '+55#########',
        '+56##########',
        '+57##########',
        '+58##########',
        '+60##########',
        '+61##########',
        '+62##########',
        '+63##########',
        '+64##########',
        '+65##########',
        '+66##########',
        '+81##########',
        '+82##########',
        '+84##########',
        '+86##########',
        '+90##########',
        '+91##########',
        '+92##########',
        '+93#########',
        '+94#########',
        '+95##########',
        '+98##########',
        '+211#########',
        '+212#########',
        '+213#########',
        '+216########',
        '+218#########',
        '+220#######',
        '+221#########',
        '+222########',
        '+223########',
        '+224#########',
        '+225##########',
        '+226########',
        '+227########',
        '+228########',
        '+229########',
        '+230########',
        '+231#########',
        '+232########',
        '+233#########',
        '+234##########',
        '+235########',
        '+236########',
        '+237#########',
        '+238#######',
        '+239#######',
        '+240#########',
        '+241########',
        '+242#########',
        '+243#########',
        '+244#########',
        '+245#########',
        '+246#######',
        '+247######',
        '+248#######',
        '+249#########',
        '+250#########',
        '+251#########',
        '+252#########',
        '+253########',
        '+254##########',
        '+255#########',
        '+256#########',
        '+257########',
        '+258#########',
        '+260#########',
        '+261#########',
        '+262#########',
        '+263##########',
        '+264#########',
        '+265#########',
        '+266########',
        '+267##########',
        '+268#########',
        '+269#######',
        '+290#####',
        '+291#######',
        '+297#######',
        '+298######',
        '+299######',
        '+350########',
        '+351#########',
        '+352##########',
        '+353##########',
        '+354#########',
        '+355#########',
        '+356########',
        '+357########',
        '+358##########',
        '+359#########',
        '+370########',
        '+371########',
        '+372##########',
        '+373########',
        '+374########',
        '+375##########',
        '+376#########',
        '+377#########',
        '+378##########',
        '+380##########',
        '+381##########',
        '+382#########',
        '+383#########',
        '+385#########',
        '+386########',
        '+387#########',
        '+389########',
        '+420#########',
        '+421#########',
        '+423#########',
        '+500#####',
        '+501#######',
        '+502########',
        '+503########',
        '+504########',
        '+505########',
        '+506########',
        '+507##########',
        '+508#########',
        '+509########',
        '+590#########',
        '+591#########',
        '+592#######',
        '+593##########',
        '+594#########',
        '+595##########',
        '+596#########',
        '+597#######',
        '+598##########',
        '+599########',
        '+670########',
        '+672######',
        '+673#######',
        '+674#######',
        '+675########',
        '+676#######',
        '+677#######',
        '+678#######',
        '+679#######',
        '+680#######',
        '+681#########',
        '+682#####',
        '+683#######',
        '+685##########',
        '+686########',
        '+687######',
        '+688#######',
        '+689#########',
        '+690#######',
        '+691#######',
        '+692#######',
        '+800########',
        '+808########',
        '+850##########',
        '+852#########',
        '+853########',
        '+855##########',
        '+856##########',
        '+870#########',
        '+878############',
        '+880##########',
        '+881#########',
        '+882##########',
        '+883#########',
        '+886##########',
        '+888###########',
        '+960##########',
        '+961########',
        '+962#########',
        '+963#########',
        '+964##########',
        '+965########',
        '+966##########',
        '+967#########',
        '+968#########',
        '+970##########',
        '+971##########',
        '+972##########',
        '+973########',
        '+974########',
        '+975########',
        '+976##########',
        '+977##########',
        '+979#########',
        '+992#########',
        '+993########',
        '+994#########',
        '+995#########',
        '+996#########',
        '+998#########',
    ];

    /**
     * @example '555-123-546'
     *
     * @return string
     */
    public function phoneNumber()
    {
        return static::numerify($this->generator->parse(static::randomElement(static::$formats)));
    }

    /**
     * @example +11134567890
     *
     * @return string
     */
    public function e164PhoneNumber()
    {
        return static::numerify($this->generator->parse(static::randomElement(static::$e164Formats)));
    }

    /**
     * International Mobile Equipment Identity (IMEI)
     *
     * @see http://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity
     * @see http://imei-number.com/imei-validation-check/
     *
     * @example '720084494799532'
     *
     * @return int $imei
     */
    public function imei()
    {
        $imei = (string) static::numerify('##############');
        $imei .= Luhn::computeCheckDigit($imei);

        return $imei;
    }
}
Access Token

Get Access Token

Get access token to initiates payment transaction.

Endpoint: POST generate-token
Parameter Type Comments
client_id string Enter merchant API client/primary key
secret_id string Enter merchant API secret key
env string Enter merchant API environment
merchant_id string Enter merchant API merchant id
Just request to that endpoint with all parameter listed below:
                    
                        Request Example (guzzle)
                        

<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', $base_url. 'v1/generate-token', [
'headers' => [
  'accept' => 'application/json',
  'content-type' => 'application/json',
 ],
'form_params' => [
  'client_id' => '$client_id',
  'secret_id' => 'secret_id',
  'env' => 'env',
  'merchant_id' => 'merchant_id',
 ],
]);
echo $response->getBody();
                    
                        
**Response: SUCCESS (200 OK)**
{
 "message": {
 "success": [
  "Successfully token is generated"
 ]
},
"data": {
 "token":"eyJpdiI6InpkczhjTjhQdVhUL2lKQ0pSUUx6aUE9P
SIsInZhbHVlIjoiVGVBTVBDTXltbjNZcEIvdEJveGpTSno3TU5NRUtn
VkhCZ1pHTFNCUnZGQ2UxMnYxN202cEE1YVRDTEFsc0ZERExoTjdtL0dTL2x
oU3QzeUJJOExiMUx5T0w1L0llUXhTUkU1cWVLWEdEbEplb0dKNXcwbTNRM0
VxdkUwYzZuNFdtNkhMQ0pRZysyNWkvdzBxSlBoSVBSOGFTekNnR2RXNHVtc
G9lMGZOTmNCcm1hR3c5Sk9KTnB4Y3ltZDl6cm90MThrR21Ca3B1azc3bXRi
Q0J6SW96UVo1elNkU1ZqeE05bTcwWGp1MEUxWlJFdnNWTmpSbnVpeW92b2U
4dXZkUGgyb1VmK0luaGdyaFlsVTZlcVpVRnZlTG1DeFF6Ykk2T2h6Z3Jzbn
IyNHpNdHowSE5JdDR0Y0pZT20zUm1XYW8iLCJtYWMiOiJlY2M4NGE1OGUzYz
kzYzk0YzljNmVmNjE0YWI0ZDIwOGI3NDQ2YWEyY2ZhNzc0NzE4ZmY1ZmYyMz
IyZmQzNDY1IiwidGFnIjoiIn0=",
},
"type": "success"
}
                    
                        
**Response: ERROR (400 FAILED)**
{
 "message": {
 "error": [
  "Invalid credentials."
 ]
},
"data": null,
"type": "error"
}