|
|
@@ -299,13 +299,13 @@ class TestController extends BaseController
|
|
|
die;
|
|
|
}
|
|
|
|
|
|
- //退款操作 ssh 20231029
|
|
|
+ //订单退款接口 ssh 20250815
|
|
|
public function actionRefund()
|
|
|
{
|
|
|
$shopId = 13626;
|
|
|
$shop = ShopClass::getById($shopId, true);
|
|
|
if (empty($shop)) {
|
|
|
- util::fail('没有找到门店15');
|
|
|
+ util::fail('没有找到所在的门店');
|
|
|
}
|
|
|
$merchantPrivateKeyPath = Yii::getAlias("@vendor/lakala") . '/production/api_private_key.pem';
|
|
|
$lklCertificatePath = Yii::getAlias("@vendor/lakala") . '/production/lkl-apigw-v1.cer';
|
|
|
@@ -320,7 +320,10 @@ class TestController extends BaseController
|
|
|
$laResource = new Lakala($params);
|
|
|
$refundReason = '暂无';
|
|
|
$refundOrderSn = orderSn::getCgRefundSn();
|
|
|
- $refundPrice = 0.01;
|
|
|
+ $refundPrice = 0;
|
|
|
+ if ($refundPrice <= 0) {
|
|
|
+ util::fail('请填写金额');
|
|
|
+ }
|
|
|
$refundFee = bcmul($refundPrice, 100);
|
|
|
$orderSn = 'KD26628409';
|
|
|
$originTradeNo = '20250815110113130166222385664461';
|
|
|
@@ -338,6 +341,31 @@ class TestController extends BaseController
|
|
|
print_r($response);
|
|
|
}
|
|
|
|
|
|
+ //订单退款接口(这个有云音响声音会通知商家) ssh 20250815
|
|
|
+ public function actionLsTradeRefund()
|
|
|
+ {
|
|
|
+ util::stop('接口已关闭');
|
|
|
+ $shopId = 17117;
|
|
|
+ $shop = ShopClass::getById($shopId, true);
|
|
|
+ if (empty($shop)) {
|
|
|
+ util::stop('没有找到门店哦');
|
|
|
+ }
|
|
|
+ $orderSn = 'KD26615540';
|
|
|
+ $orderInfo = ClassesOrderClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
+ if (!empty($orderInfo)) {
|
|
|
+ util::stop('有订单,不能走这个退款渠道');
|
|
|
+ }
|
|
|
+ $actPrice = 0;
|
|
|
+ if ($actPrice <= 0) {
|
|
|
+ util::fail('请填写退款金额');
|
|
|
+ }
|
|
|
+ $order = ['orderSn' => $orderSn, 'actPrice' => $actPrice];
|
|
|
+ $respond = HdRefundClass::onlyRefundAmount($shop, $order);
|
|
|
+ echo "<pre>";
|
|
|
+ print_r($respond);
|
|
|
+ util::stop();
|
|
|
+ }
|
|
|
+
|
|
|
public function actionApply()
|
|
|
{
|
|
|
$id = 2888;
|
|
|
@@ -724,27 +752,6 @@ class TestController extends BaseController
|
|
|
print_r($response);
|
|
|
}
|
|
|
|
|
|
- //零售订单退款 ssh 20250611
|
|
|
- public function actionLsTradeRefund()
|
|
|
- {
|
|
|
- util::stop('接口已关闭');
|
|
|
- $shopId = 17117;
|
|
|
- $shop = ShopClass::getById($shopId, true);
|
|
|
- if (empty($shop)) {
|
|
|
- util::stop('没有找到门店哦');
|
|
|
- }
|
|
|
- $orderSn = 'KD26615540';
|
|
|
- $orderInfo = ClassesOrderClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
- if (!empty($orderInfo)) {
|
|
|
- util::stop('有订单,不能走这个退款渠道');
|
|
|
- }
|
|
|
- $order = ['orderSn' => $orderSn, 'actPrice' => 55];
|
|
|
- $respond = HdRefundClass::onlyRefundAmount($shop, $order);
|
|
|
- echo "<pre>";
|
|
|
- print_r($respond);
|
|
|
- util::stop();
|
|
|
- }
|
|
|
-
|
|
|
//零售订单查询 ssh 20231031
|
|
|
public function actionLsTradeQuery()
|
|
|
{
|