<?php
 namespace Module\PayCenter\Traits; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Response; use Module\PayCenter\Util\PayOrderUtil; trait PayCenterPerformTrait { private function performSubmitOrder($biz, $bizId, $feeTotal, $body, $param = []) { $input = InputPackage::buildFromInput(); $redirect = $input->getTrimString('redirect'); $order = PayOrderUtil::prepareOrder($biz, $bizId, $feeTotal, $body, $redirect, $param); $orderSecretId = PayOrderUtil::getOrderSecretId($order['id']); $payUrl = modstart_web_url('pay') . "?order=$orderSecretId"; return Response::generate(0, null, [ 'payUrl' => $payUrl, 'orderSecretId' => $orderSecretId, ], $payUrl); } }