mijndomein/dreamcommerce-lms-client
最新稳定版本:7.0
Composer 安装命令:
composer require mijndomein/dreamcommerce-lms-client
包简介
An API client for the Dreamcommerce license manager service
README 文档
README
The API library for the DreamCommerce license manager service (LMS) Client
Usage
Before you can use the license functions in the DreamCommerce LMS Client you will need create the LicenseManagerClient.
The client will need an ApiConnection with the api url, username, and password.
use DreamCommerce\LicenseManager\ApiConnection; use GuzzleHttp\Client as HttpClient; $dreamCommerceClient = new LicenseManagerClient( new ApiConnection( new HttpClient, 'http://dc-api-url', 'username', 'password' ) );
Creating a License
To create a DreamCommerce license there is a createLicense method. It will return a License object with the
information of the just created license.
use DreamCommerce\LicenseManager\Command\CreateLicenseCommand; $command = new CreateLicenseCommand; $command->email = 'user-email@test.com'; // user email address $command->host = 'test-shop'; // shop address, e.g. "store001.partnerdomain.com" or "store001" and partnerdomain.com will be added automatically $command->licenseType = 0; // license type (0 - trial, 1 - paid version) $command->shopVersion = 'x.x.x'; // shop version, if empty latest version will be used (optional) $command->package = 'silver'; // package name $command->periodInMonths = 12; // period in months. So 12 when you're offering a year $command->notes = 'notes'; // additional notes (optional) $command->ssoShopSalt = 'sso-hash-data'; // sso hash (optional) $command->ssoHandshakeRequesterIp = '127.0.0.1/32'; // sso IP address/mask of handshake system (example: 127.0.0.1/32) or list of IP address/mask pairs delimited by semicolon (example 127.0.0.1/32;192.168.0.0/24) (optional) $license = $dreamCommerceClient->createLicense($command);
Removing a License
To remove a DreamCommerce license there is a removeLicense method. It will return a boolean with the result of
the operation.
$command = new RemoveLicenseCommand; $command->licenseId = 'license-id'; $isRemoved = $dreamCommerceClient->removeLicense($command);
Suspending a License
To suspend a DreamCommerce license there is a suspendLicense method. It will return a boolean with the result of
the operation.
$command = new SuspendLicenseCommand; $command->licenseId = 'license-id'; $isSuspended = $dreamCommerceClient->suspendLicense($command);
Un-suspending a License
To suspend a DreamCommerce license there is a unsuspendLicense method. It will return a boolean with the result
of the operation.
$command = new UnsuspendLicenseCommand; $command->licenseId = 'license-id'; $isUnsuspended = $dreamCommerceClient->unsuspendLicense($command);
Adding a Domain to a License
To add a domain to a DreamCommerce license there is a addDomainToLicense method. It will return a boolean with the
result of the operation.
$command = new AddDomainToLicenseCommand; $command->licenseId = 'license-id'; $command->licenseDomain = 'domain.com'; $domainAdded = $dreamCommerceClient->addDomainToLicense($command);
Removing a Domain from a License
To remove a domain from a DreamCommerce license there is a removeDomainFromLicense method. It will return a boolean
with the result of the operation.
$command = new RemoveDomainFromLicenseCommand; $command->licenseId = 'license-id'; $command->licenseDomain = 'domain.com'; $domainRemoved = $dreamCommerceClient->removeDomainFromLicense($command);
Ordering a Ssl Certificate for a License
To order a ssl certificate for a DreamCommerce license there is a orderSslCertificateForLicense method. It will
return a boolean with the result of the operation.
$command = new OrderCertificateForLicenseCommand; $command->licenseId = 'license-id'; $command->domainName = 'domain-name.com'; $command->email = 'email@domain-name.com'; $command->company = 'My Company'; $command->firstName = 'First Name'; $command->lastName = 'Last Name'; $command->address = 'Examplestreet 1'; $command->postalCode = '123415'; $command->city = 'City'; $command->state = 'State'; $command->country = 'Country'; $command->phoneNumber = '000000000000'; $certificateOrdered = $dreamCommerceClient->orderSslCertificateForLicense($command);
mijndomein/dreamcommerce-lms-client 适用场景与选型建议
mijndomein/dreamcommerce-lms-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 275 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 04 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mijndomein/dreamcommerce-lms-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mijndomein/dreamcommerce-lms-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 275
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-04-16