$params['street']])->find(); $data = [ 'order_from' => $params['order_from'], 'order_type' => $params['order_type'], 'collection_account' => $subMerchant['sub_mch_id'], // 子商户号 'pay_user_role' => $params['pay_user_role'], 'pay_user_info' => json_encode($params['pay_user_info']), 'order_no' => generate_sn(PayOrder::class, 'order_no'), 'business_order_no' => $params['business_order_no'], 'total_fee' => $params['total_fee'], // int 单位:分 'pay_type' => PayOrderEnum::PAY_TYPE, 'pay_status' => PayOrderEnum::PAY_STATUS_UNPAID, 'business_callback_url' => $params['business_callback_url'], 'create_time' => time(), 'update_time' => time(), ]; return PayOrder::create($data); } }