<?php
namespace common\pay\wangtong;

class PayUtils
{
    /**
     * @param array $data
     * @return string 
     */
    public static function createLinkString($data, $md5Key)
    {
        ksort($data);
        $str = '';
        foreach ($data as $key => $value) {
            $str .= "{$key}={$value}&";
        }
       // $str =  rtrim($str, '&');
        return strtoupper(md5($str . "key=" . $md5Key));
    }
}