src/Query/Wx/WxTransferQuery.php
protected function createBackData(array $data)
    {
        // 将金额处理为元
        $amount = bcdiv($data['payment_amount'], 100, 2);

        $retData = [
            'is_success'    => 'T',
            'response'  => [
                'trans_no'   => $data['partner_trade_no'],// 商户单号
                'transaction_id'  => $data['detail_id'],// 付款单号
                'status'  => strtolower($data['status']),// 转账状态
                'reason'    => $data['reason'],// 失败原因
                'openid'   => $data['openid'],
                'payee_name'   => $data['transfer_name'],// 收款用户姓名
                'amount'   => $amount,
                'pay_date'   => $data['transfer_time'],
                'desc'   => $data['desc'],// 付款描述
                'channel' => Config::WX_TRANSFER,
            ],
        ];

        return $retData;
    }
protected function createBackData(array $data)
    {
        // 将金额处理为元
        $amount = bcdiv($data['payment_amount'], 100, 2);

        $retData = [
            'is_success'    => 'T',
            'response'  => [
                'trans_no'   => $data['partner_trade_no'],// 商户单号
                'transaction_id'  => $data['detail_id'],// 付款单号
                'status'  => strtolower($data['status']),// 转账状态
                'reason'    => $data['reason'],// 失败原因
                'openid'   => $data['openid'],
                'payee_name'   => $data['transfer_name'],// 收款用户姓名
                'amount'   => $amount,
                'pay_date'   => $data['transfer_time'],
                'desc'   => $data['desc'],// 付款描述
                'channel' => Config::WX_TRANSFER,
            ],
        ];

        return $retData;
    }
protected function createBackData ( array $ data ) { // 将金额处理为元 $ amount = bcdiv ( $ data [ 'payment_amount' ] , 100 , 2 ) ; $ retData = [ 'is_success' => 'T' , 'response' => [ 'trans_no' => $ data [ 'partner_trade_no' ] , // 商户单号 'transaction_id' => $ data [ 'detail_id' ] , // 付款单号 'status' => strtolower ( $ data [ 'status' ] ) , // 转账状态 'reason' => $ data [ 'reason' ] , // 失败原因 'openid' => $ data [ 'openid' ] , 'payee_name' => $ data [ 'transfer_name' ] , // 收款用户姓名 'amount' => $ amount , 'pay_date' => $ data [ 'transfer_time' ] , 'desc' => $ data [ 'desc' ] , // 付款描述 'channel' => Config :: WX_TRANSFER , ] , ] ; return $ retData ; }
返回数据给客户端
@param array $data
@return array
@author helei
返回数据给客户端