return_code != 'SUCCESS') { Yii::warning('return_code error:' . $postObj->return_code); util::end(); } $orderId = $postObj->out_trade_no; $total_fee = $postObj->total_fee; $totalFee = $total_fee / 100; $attach = $postObj->attach; parse_str($attach);//接收流水类型、代金劵 $couponId = isset($couponId) ? $couponId : 0; $capitalType = isset($capitalType) ? $capitalType : null;//流水类型 if (isset($capitalType) == false) { Yii::warning('capitalType empty,orderId:' . $orderId); util::end(); } $return = xhPayToolService::weixinPay($orderId, $totalFee, $capitalType, $couponId);//支付回调流程 if ($return['code'] == 'A0002') { Yii::warning('callback exec and failed,capitalType:' . $capitalType . ' orderId:' . $orderId); util::end(); } echo ''; } }