Преглед изворни кода

fix(payment): 修复物流信息上传结构问题

- 调整 PaymentRecordService 中 shippingList 数据结构,确保其为数组嵌套格式
- 在 ExpressService 中重新排序物流信息字段,提升数据一致性
- 统一物流上传接口字段顺序,增强代码可读性
- 确保 is_all_delivered 字段在物流信息上传时正确传递
runphp пре 4 месеци
родитељ
комит
ead445e5a8
1 измењених фајлова са 8 додато и 6 уклоњено
  1. 8 6
      src/Service/PaymentRecordService.php

+ 8 - 6
src/Service/PaymentRecordService.php

@@ -120,12 +120,14 @@ class PaymentRecordService
                     transactionID: $wechatPayment->wechat_transaction_id,
                     openid: $payment['payment_result']['acc_resp_fields']['user_id'],
                     shippingList: [
-                        'tracking_no' => $order['express_number'],
-                        'express_company' => $wechatPayment->express_company,
-                        'item_desc' => $goods['goods_name'],
-                        'contact' => [
-                            'receiver_contact' => substr_replace($order['mobile'], '****', -8, 4),
-                        ]
+                        [
+                            'tracking_no' => $order['express_number'],
+                            'express_company' => $wechatPayment->express_company,
+                            'item_desc' => $goods['goods_name'],
+                            'contact' => [
+                                'receiver_contact' => substr_replace($order['mobile'], '****', -8, 4),
+                            ]
+                        ],
                     ]
                 );
             } catch (LogicException $e) {