Download the PHP package lun324/open-api-sdk-php without Composer

On this page you can find all versions of the php package lun324/open-api-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package open-api-sdk-php

Fulu OpenApi SDK for PHP

概述

福禄开放平台API,是福禄开放平台对外提供的安全、低成本、高可靠的虚拟充值服务。用户可以通过调用API,在任何应用、任何时间、任何地点采购虚拟商品,也可以通过用户Web控制台对数据进行简单的管理。适合各种网站、开发企业及开发者使用。

运行环境

安装方法

  1. 如果您通过composer管理您的项目依赖,可以在你的项目根目录运行:

    $ composer require lun324/open-api-sdk-php

    或者在你的composer.json中声明对Fulu OpenApi SDK for PHP的依赖:

    "require": {
        "lun324/open-api-sdk-php": "2.0"
    }

    然后通过composer install安装依赖。composer安装完成后,在您的PHP代码中引入依赖即可:

    require_once __DIR__ . '/vendor/autoload.php';
  2. 下载SDK源码,在您的代码中引入SDK目录下的autoload.php文件:

    require_once '/path/open-api-sdk-php/autoload.php';

快速使用

常用类

类名 解释
OpenApiSDK\DefaultOpenApiClient OpenApi客户端类,用户通过DefaultOpenApiClient的实例调用接口
OpenApiSDK\Common\ApiGlobalConst 接口地址常量
OpenApiSDK\Common\CardUtil 卡密解密工具类
OpenApiSDK\Model\InputCardOrderDto 卡密商品取卡接口
OpenApiSDK\Model\InputDirectOrderDto 直充商品下单接口
OpenApiSDK\Model\InputMatchPhoneProductListDto 手机号归属地查询接口
OpenApiSDK\Model\InputOrderGetDto 订单查询接口
OpenApiSDK\Model\InputPhoneOrderDto 话费订单接口
OpenApiSDK\Model\InputProductDto 商品信息接口
OpenApiSDK\Model\InputProductTemplateDto 商品模板信息接口
OpenApiSDK\Model\InputTrafficOrderDto 流量订单接口
OpenApiSDK\Model\InputUserDto 用户信息接口

OpenApiClient初始化

OpenApi操作通过DefaultOpenApiClient类完成的,下面代码创建一个OpenApiClient对象:

直充下单接口

卡密下单

话费下单接口

订单查询接口

获取商品列表接口

获取商品信息接口

获取商品模板接口

获取用户信息接口

手机流量充值接口

手机号归属地接口

运行Example程序

  1. 修改 example/index.php, 中的 $appKey 、$appSecret 的值
  2. 执行 cd example/ && php index.php

License

联系我们


All versions of open-api-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
ext-json Version *
ext-openssl Version *
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lun324/open-api-sdk-php contains the following files

Loading the files please wait ....