eee
This commit is contained in:
@@ -142,6 +142,9 @@ class WxV3PaymentNotify extends SmallProgram
|
|||||||
$this->notifyModel->attach = $data['attach'];
|
$this->notifyModel->attach = $data['attach'];
|
||||||
$this->notifyModel->success_time = $data['success_time'];
|
$this->notifyModel->success_time = $data['success_time'];
|
||||||
$this->notifyModel->promotion_detail = [];
|
$this->notifyModel->promotion_detail = [];
|
||||||
|
if (!isset($data['promotion_detail'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
foreach ($data['promotion_detail'] as $datum) {
|
foreach ($data['promotion_detail'] as $datum) {
|
||||||
$detail = new PromotionDetail();
|
$detail = new PromotionDetail();
|
||||||
$detail->amount = $datum['amount'];
|
$detail->amount = $datum['amount'];
|
||||||
@@ -154,8 +157,10 @@ class WxV3PaymentNotify extends SmallProgram
|
|||||||
$detail->currency = $datum['currency'];
|
$detail->currency = $datum['currency'];
|
||||||
$detail->stock_id = $datum['stock_id'];
|
$detail->stock_id = $datum['stock_id'];
|
||||||
$detail->goods_detail = [];
|
$detail->goods_detail = [];
|
||||||
foreach ($datum['goods_detail'] as $value) {
|
if (isset($data['goods_detail'])) {
|
||||||
$detail->goods_detail[] = new GoodsDetail($value);
|
foreach ($datum['goods_detail'] as $value) {
|
||||||
|
$detail->goods_detail[] = new GoodsDetail($value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$this->notifyModel->promotion_detail[] = $detail;
|
$this->notifyModel->promotion_detail[] = $detail;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user