sparkeleven/abn-lookup 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sparkeleven/abn-lookup

Composer 安装命令:

composer require sparkeleven/abn-lookup

包简介

ABN Lookup

README 文档

README

Latest Stable Version Total Downloads License

sparkeleven/abn-lookup is a composer package for easy access to ABN Lookup SOAP API sets. Supports both Laravel ^5|^6|^7|^8 and also pure PHP/Composer project.

Installation

1. Downloading package into your project

To plant this library on your Laravel project, you can simply run the following command inside your working directory of the Laravel project.

composer require sparkeleven/abn-lookup

2. Setting up service provider and alias

For Laravel versions earlier than 5.5 (which doesn't provide package auto-discovery), you should add the followings into your config/app.php file;

// Under `providers` array
SparkEleven\AbnLookup\AbnLookupServiceProvider::class,

// Under `aliases` array
'AbnLookup' => SparkEleven\AbnLookup\Facades\AbnLookup::class,

3. Publishing the package into your project

Run the command below to publish the package (config, translations, views):

php artisan vendor:publish --provider=SparkEleven\\AbnLookup\\AbnLookupServiceProvider

Configuration

After successfully published the package, you should check the config/abn-lookup.php file. Read the guides on this file to setup essential information (Authentication GUID and etc).

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Authentication GUID
    |--------------------------------------------------------------------------
    |
    | To access ABN Lookup web services, an authentication GUID (Globally
    |  Unique Identifier) is required. You can find your own GUID from the
    |  email received after your registration is completed.
    |
    | For more details, visit below link;
    |  https://abr.business.gov.au/Tools/WebServices#registration
    |
    */

    'auth_guid' => env('ABNLOOKUP_AUTH_GUID'),

    /*
    |--------------------------------------------------------------------------
    | WSDL path
    |--------------------------------------------------------------------------
    |
    | Path to WSDL which describes the web services of ABN Lookup. It is
    |  recommended not to change this value from default.
    |
    | For more details, visit below link;
    |  https://abr.business.gov.au/Tools/WebServices#wsdl
    |
    */

    'wsdl' => \SparkEleven\AbnLookup\Services\AbnLookupService::DEFAULT_WSDL,

    /*
    |--------------------------------------------------------------------------
    | WSDL cache method
    |--------------------------------------------------------------------------
    |
    | For better performance, it is recommended to cache the WSDL file. Do not
    |  change this value if you are not sure about it, or you will experience
    |  terrible response time.
    |
    | Must be one of;
    |  * WSDL_CACHE_NONE
    |  * WSDL_CACHE_DISK
    |  * WSDL_CACHE_MEMORY
    |  * WSDL_CACHE_BOTH
    |
    | For more details, visit below link;
    |  https://www.php.net/manual/en/soapclient.soapclient.php
    |
    */

    'wsdl_cache' => env('ABNLOOKUP_WSDL_CACHE', WSDL_CACHE_DISK),

];

How to use

You can simply import AbnLookup facade to access static search methods provided.

Examples:

use AbnLookup;

// searchByAbn
$result = AbnLookup::searchByAbn('33102417032');
echo $result['mainName']['organisationName']; // Google Australia Pty Ltd

// searchByAsic
$result = AbnLookup::searchByAsic('102417032');
echo $result['entityType']['entityDescription']; // Australian Private Company
echo $result['mainName']['organisationName']; // Google Australia Pty Ltd

// searchByName
$result = AbnLookup::searchByName('Google Australia Pty Ltd');
echo $result['searchResultsRecord'][0]['ABN']['identifierValue']; // 41726564339

You can check the correct i/o schema on the WSDL document.

Outside of Laravel

This package can be also used outside of Laravel project. Run below code snippet to initialize service class and use the same code as on Laravel project.

use SparkEleven\AbnLookup\Services\AbnLookupService as AbnLookup;

// Initiate service
AbnLookup::reset(
    '00000000-0000-0000-0000-000000000000', // Your authentication GUID
    AbnLookup::DEFAULT_WSDL, // WSDL path
    WSDL_CACHE_DISK, // WSDL cache method
);

License

sparkeleven/abn-lookup is free software distributed under the terms of the MIT license.

Contribution guidelines

Support follows PSR-1 and PSR-4 PHP coding standards, and semantic versioning.

Please report any issue you find in the issues page. Pull requests are welcome.

sparkeleven/abn-lookup 适用场景与选型建议

sparkeleven/abn-lookup 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 22.06k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 02 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 sparkeleven/abn-lookup 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sparkeleven/abn-lookup 我们能提供哪些服务?
定制开发 / 二次开发

基于 sparkeleven/abn-lookup 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

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