dibukeu/client-php

dibuk 客户端 PHP 库

v1.3.0 2024-03-18 13:22 UTC

This package is auto-updated.

Last update: 2024-09-18 14:50:29 UTC


README

Build Status

安装

composer require dibukeu/client-php

用法

术语

  • 销售者 - klient(向最终客户销售,网店)
  • 用户 - 最终客户(从网店购买)
  • 订单 - 订单

公共方法

  • $client = new DibukClient([ 'sellerId' => 'string', 'signature' => 'string', 'url' => 'string', 'version' => 'string']);
  • $client->setUser(['id' => 'int', 'email' => 'string', 'name' => 'string', 'surname' => 'string']); - 设置最终用户信息
  • $client->setItem([ 'id' => '导出项的ID / ISBN','order_id' => '客户订单ID','payment_id' => 'int','price' => 'float','currency' => 'EUR|CZK','unique_id' => 'int - 唯一标识符,例如订单ID/项或orders_items.id']); - 设置购买项目的信息
  • $client->createLicense() - 购买书籍(在Dibuk中购买)
  • $client->sendByEmail($email) - 通过电子邮件发送电子书
  • $client->getAllDownloadLinks() - 下载链接列表
  • $client->getAttachmentsLinks() - 下载电子书附件的链接列表
  • showAllDownloadLinks - 未测试 - 显示包含下载链接的HTML页面(可以设置自己的模板)
  • exportItems - 未测试 - 返回目录中的项目列表(电子书和有声书)
  • exportCatalog - 未测试 - 返回目录的类别列表
  • getReport - ??

Dibuk API URL

生产环境

https://agregator.dibuk.eu/2_3/call.php

沙盒环境

https://sandbox.dibuk.eu/agregator/2_3/call.php

示例

//TODO