← 所有集成在 GitHub 查看源代码 →
Tier 2 — Full Deakee partner
Magento 2
Magento 2 CE / Commerce
Adds Stores → Configuration → Deakee → Loyalty. Earn fires via a `sales_order_save_after` observer and updates the plugin's own DB tables. Customer account dashboard adds "My Deakee Wallet" with withdraw/deposit controls.
Composer
composer require deakee/loyalty-magento2两种集成模式
同一插件代码支持两种模式。今天先以 OAuth2 模式启动;日后通过配置切换加入桥接层 — 无需数据迁移。
OAuth2 模式
计划中你的数据库中维护中心化忠诚度,通过 OAuth2 同步到 Deakee。不上链、不进交易所 — 但客户可在 Deakee 中查看余额,你可接受 Deakee 凭证。
- 对接当前的 deakee.com/api/oauth/* 后端。
- 无代币、无作为发行者的法律风险。
- 通过配置切换即可升级到桥接模式。
桥接模式
计划中部署 ERC-8063 合约;客户可将中心化余额铸造为链上代币,并在 Deakee 交易所交易。
- 增加交易所上市和跨品牌兑换。
- 需要 Deakee 中继器(尚未发布)。
- 与 OAuth2 模式同一套插件代码 — 准备好时再启用。
安装
- composer require deakee/loyalty-magento2
- bin/magento module:enable Deakee_Loyalty && bin/magento setup:upgrade
- Stores → Configuration → Deakee → Loyalty — set earn rate, paste API key.
- Click "Deploy My Token" (one-time ERC-8063 deployment).
- Done — earn is centralized, bridge is user-initiated.
Deakee 如何连接到你的插件
你的合作伙伴 API 密钥用于向 Deakee 中继器认证调用。OAuth2 authorize/token URL 每个客户使用一次,用于获取钱包地址(范围:仅 identity)。
| authorize_url | https://deakee.com/oauth2/authorize (scope=identity) |
| token_url | https://deakee.com/oauth2/token |
| api_base_url | https://deakee.com/api/relayer/v1 |
验证合规性
上线前,针对你的部署运行官方一致性验证器。它会检查中心化账本、identity OAuth 流程、桥接铸造/销毁连接以及幂等性。
npx @deakee/loyalty-verifier \
--partner-api-key <your key> \
--plugin-url <your plugin URL> \
--contract-address <your ERC-8063 contract> \
--test-user-email test@example.com遇到问题?阅读完整的 README 或在 github.com/deakee/loyalty/issues 提交 issue。