bingyu-duanxinwangzhan/message-code/message-admin/application/common/wxpay/lib/WxPayNotifyResults.php

29 lines
554 B
PHP
Executable File

<?php
/**
* Created by PhpStorm.
* User: lock
* Date: 2019/2/24
* Time: 7:19 PM
*/
namespace app\common\wxpay\lib;
class WxPayNotifyResults extends WxPayResults
{
/**
* 将xml转为array
* @param WxPayConfigInterface $config
* @param string $xml
* @return WxPayNotifyResults
* @throws WxPayException
*/
public static function Init($config, $xml)
{
$obj = new self();
$obj->FromXml($xml);
//失败则直接返回失败
$obj->CheckSign($config);
return $obj;
}
}