承接 imransaleem/telenor-integration 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

imransaleem/telenor-integration

最新稳定版本:v1.0.0

Composer 安装命令:

composer require imransaleem/telenor-integration

包简介

A Laravel package for integrating with Telenor APIs.

README 文档

README

Latest Version on Packagist License

A Laravel package for integrating with Telenor APIs, supporting login, inquiry, and fund transfer via CNIC.

Features

  • Corporate login using encrypted payload
  • Balance inquiry by CNIC
  • Fund transfer to CNIC/MSISDN
  • Automatic request logging to database

Installation

composer require imransaleem/telenor-integration

If you're not using Laravel package auto-discovery, add the service provider and alias manually:

config/app.php

'providers' => [
    ImranSaleem\TelenorIntegration\TelenorIntegrationServiceProvider::class,
],

'aliases' => [
    'Telenor' => ImranSaleem\TelenorIntegration\Facades\Telenor::class,
],

Configuration

Publish the config file:

php artisan vendor:publish --tag=telenor-config

Then update your .env:

TELENOR_BASE_URL=https://api.telenor.com.pk
TELENOR_MSISDN=92300xxxxxxx
TELENOR_CLIENT_ID=your-client-id
TELENOR_CLIENT_SECRET=your-client-secret
TELENOR_LOGIN_CREDENTIALS=92300xxxxxxx:password

Keys

Place your RSA keys in the following paths:

storage/app/keys/private.pem
storage/app/keys/subgateway.pem

Migrations

Run the migration to create the API log table:

php artisan migrate

Usage

Login

$login = Telenor::login();

Inquiry

if ($login['ResponseCode'] === '0') {
    $inquiry = Telenor::inquiry(
        $login['Timestamp'],
        $beneficiary, // object with contact_number and cnic
        $amount  // amount to disburse
    );
}

Transfer

if ($inquiry['ResponseCode'] === '0') {
    $transfer = Telenor::transfer(
        $login['Timestamp'],
        $beneficiary,
        $amount
    );
}

Logging

All API requests are logged in the telenor_api_logs table automatically.

License

MIT © Imran Saleem

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-02