PHP Classes

Veriphone PHP Phone Number Validation Service: Check if a phone number is valid with Verifone API

Recommend this page to a friend!
  Info   View files Documentation   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-11-05 (2 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 40 All time: 10,781 This week: 112Up
Version License PHP version Categories
veriphone-service 1.0The PHP License7PHP 7
Description 

Author

This package can check if a phone number is valid with Verifone API.

It can send an HTTP request to the Verifone.io API to send a phone number to be verified.

The package can return a response telling if the number is valid, as well as other details like, for instance, the phone number type, the country, state, and city of the area code of the phone number, the same number formatted for use in international calls and the carrier name.

Picture of Hicri
  Performance   Level  
Name: Hicri <contact>
Classes: 23 packages by
Country: Turkey Turkey
Innovation award
Innovation award
Nominee: 3x

Instructions

  • First of all, we'll add the API key and API URL of the service we're using to the .env file of our project. If you don't have an account yet on veriphone.io, you should create one. Once you have an account, you can copy your API key from the dashboard page and put it into your .env file.
    VERIPHONE_BASE_URL="https://api.veriphone.io/"
    VERIPHONE_API_KEY="YOUR-API-KEY"

  • you should extract the config/veriphone.php file to the config folder.
    php artisan vendor:publish --tag=veriphone

  • Abstract's Phone Number Validation and Verification API simply requires your unique API key and the phone number you'd like to check:
    use Slvler\VeriphoneValidation\Facedes\VeriphoneValidation;

    VeriphoneValidation::get('14152007986');

  • This was a successful request, so the valid phone number and details associated with it are returned below:
{
    "status": "success",
    "phone": "+14152007986",
    "phone_valid": true,
    "phone_type": "fixed_line_or_mobile",
    "phone_region": "California",
    "country": "United States",
    "country_code": "US",
    "country_prefix": "1",
    "international_number": "+1 415-200-7986",
    "local_number": "(415) 200-7986",
    "e164": "+14152007986",
    "carrier": ""
}

Documentation

slvler - Veriphone Service

tests Latest Stable Version Latest Unstable Version License

This package provides a convenient wrapper to the Veriphone API for Laravel applications.

Veriphone API is a REST based JSON API. It provides a set of stateless endpoints that any program or web browser can call by sending a standard HTTP request. Veriphone will respond with a standard HTTP response carrying a JSON payload. This documentation describes these endpoints, their input/output parameters and authentication methods.

Requirements

  • PHP 8.0+
  • Laravel 9.x

Installation

To install this package tou can use composer:

    composer require slvler/veriphone-validation

Usage

  • First of all we'll add the API key and API Url of the service we're using to our .env file of our project. If you don't have an account yet on veriphone.io, you should create one. Once you have an account you can copy your API key from the dashboard page and put it into you .env file.
    VERIPHONE_BASE_URL="https://api.veriphone.io/"
    VERIPHONE_API_KEY="YOUR-API-KEY"

  • you should extract the config/veriphone.php file to the config folder.
    php artisan vendor:publish --tag=veriphone

  • Abstract's Phone Number Validation and Verification API simply requires your unique API key and the phone number you'd like to check:
    use Slvler\VeriphoneValidation\Facedes\VeriphoneValidation;

    VeriphoneValidation::get('14152007986');

  • This was a successful request, so the valid phone number and details associated with it are returned below:
{
    "status": "success",
    "phone": "+14152007986",
    "phone_valid": true,
    "phone_type": "fixed_line_or_mobile",
    "phone_region": "California",
    "country": "United States",
    "country_code": "US",
    "country_prefix": "1",
    "international_number": "+1 415-200-7986",
    "local_number": "(415) 200-7986",
    "e164": "+14152007986",
    "carrier": ""
}

Testing

    composer test

Credits

License

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


  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imageconfig (1 file)
Files folder imagesrc (2 files, 4 directories)
Files folder imagetests (2 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file tests.yml Data Auxiliary data

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file veriphone.php Aux. Auxiliary script

  Files folder image Files  /  src  
File Role Description
Files folder imageContracts (1 file)
Files folder imageFacedes (1 file)
Files folder imageManagers (1 file)
Files folder imageUtils (2 files)
  Plain text file Phone.php Class Class source
  Plain text file VeriphoneValidationServiceProvider.php Class Class source

  Files folder image Files  /  src  /  Contracts  
File Role Description
  Plain text file VeriphoneContract.php Class Class source

  Files folder image Files  /  src  /  Facedes  
File Role Description
  Plain text file VeriphoneValidation.php Class Class source

  Files folder image Files  /  src  /  Managers  
File Role Description
  Plain text file Veriphone.php Class Class source

  Files folder image Files  /  src  /  Utils  
File Role Description
  Plain text file Api.php Class Class source
  Plain text file HttpResponse.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageFeature (1 file)
Files folder imageUnit (1 file)

  Files folder image Files  /  tests  /  Feature  
File Role Description
  Plain text file VeriphoneValidationTest.php Class Class source

  Files folder image Files  /  tests  /  Unit  
File Role Description
  Plain text file TestCase.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:40
This week:0
All time:10,781
This week:112Up