feat: 初始化雄戈商城服务端代码与Webhook自动部署配置
这个提交包含在:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace addons\shopro_wechat_trade\command;
|
||||
|
||||
use addons\shopro_wechat_trade\library\WxOrderPathService;
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
class InitOrderPath extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('shopro_wechat_trade:init-path')
|
||||
->setDescription('Configure WeChat mini program order detail path');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
try {
|
||||
$result = (new WxOrderPathService())->updatePath();
|
||||
$output->writeln('Order detail path configured. errcode=0');
|
||||
if (!empty($result['path'])) {
|
||||
$output->writeln('path=' . $result['path']);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln('Failed: ' . $e->getMessage());
|
||||
$output->writeln('');
|
||||
$output->writeln('若 errcode=10060035:请先发布含 pages/order/detail 的小程序到微信线上/提审版,再重试。');
|
||||
$output->writeln('发货同步(upload_shipping_info)不依赖本接口,可先配置发货管理并测试发货。');
|
||||
$output->writeln('诊断: php think shopro_wechat_trade:probe-path');
|
||||
}
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户