AopClient
class AopClient
Aop = Ali Open Platform 文档地址: https://opendocs.alipay.com/common/02nk10
Traits
Properties
protected Resp | $error | error | from AppTrait |
protected Resp | $success | success | from AppTrait |
string | $appId | ||
string | $rsaPrivateKey | ||
string | $alipayRsaPublicKeyString | ||
string | $signType | ||
protected string | $alipaySdkVersion |
Methods
No description
设置应用id
设置私钥, 去头去尾去回车,一行字符串
设置公钥
设置文件编码格式
设置加密方式
设置私钥文件路径
设置支付宝公钥路径
No description
获取验签码
获取参数内容
此方法对value做urlEncode
RSA单独签名方法,未做字符串处理,字符串处理见getSignContent()
开始执行
转换字符集编码
No description
No description
No description
No description
No description
No description
No description
No description
No description
检查返回的验签值是否正确
页面提交执行方法
No description
Open Debug.
rsaCheckV1 & rsaCheckV2 验证签名 在使用本方法前,必须初始化AopClient且传入公钥参数。 公钥是否是读取字符串还是读取文件,是根据初始化传入的值判断的。
No description
No description
生成用于调用收银台SDK的字符串
对数据进行加密
No description
No description
校验$value是否非空 if not set ,return true; if is null , return true;
Details
in
AppTrait at line 45
bool
setError(string|MessageBag $error)
设置错误
at line 113
setEnv($env = 'sandbox')
No description
at line 127
$this
setAppId($app_id)
设置应用id
at line 140
$this
setRsaPrivateKey($rsa_private_key)
设置私钥, 去头去尾去回车,一行字符串
at line 152
$this
setRsaPublicKey($rsa_public_key)
设置公钥
at line 164
$this
setPostCharset($str)
设置文件编码格式
at line 176
$this
setSingType($sign_type)
设置加密方式
at line 188
$this
setPrivateKeyPath($private_key_path)
设置私钥文件路径
at line 200
$this
setPublicKeyPath($public_key_path)
设置支付宝公钥路径
at line 207
getPublicKeyPath()
No description
at line 219
string
generateSign($params, string $signType = 'RSA2')
获取验签码
at line 230
string
getSignContent(array $params)
获取参数内容
at line 261
string
getSignContentUrlEncode(array $params)
此方法对value做urlEncode
at line 296
string
aloneRsaSign(string $data, string $privateKey, string $signType = 'RSA', bool $keyFromFile = false)
RSA单独签名方法,未做字符串处理,字符串处理见getSignContent()
at line 335
bool|mixed|SimpleXMLElement
execute(object $request, null $authToken = null, null $appInfoAuthToken = null)
开始执行
at line 476
mixed|string
charset($data, $targetCharset)
转换字符集编码
at line 497
null
parserResponseSubCode(object $request, $responseContent, $respObject, $format)
No description
at line 540
SignData
parserJSONSignData($request, $responseContent, $responseJSON)
No description
at line 556
null|string
parserJSONSignSource(object $request, $responseContent)
No description
at line 580
null|string
parserJSONSource($responseContent, $nodeName, $nodeIndex)
No description
at line 599
mixed
parserJSONSign($responseJSon)
No description
at line 610
SignData
parserXMLSignData($request, $responseContent)
No description
at line 625
null|string
parserXMLSignSource(object $request, $responseContent)
No description
at line 652
null|string
parserXMLSource($responseContent, $nodeName, $nodeIndex)
No description
at line 672
null|string
parserXMLSign($responseContent)
No description
at line 703
checkResponseSign($request, $signData, $resp, $respObject)
检查返回的验签值是否正确
at line 741
string
pageExecute(object $request, string $http_method = 'POST')
页面提交执行方法
at line 816
printDebug($content)
No description
at line 827
openDebug()
Open Debug.
at line 839
bool
rsaCheckV1(array $params)
rsaCheckV1 & rsaCheckV2 验证签名 在使用本方法前,必须初始化AopClient且传入公钥参数。 公钥是否是读取字符串还是读取文件,是根据初始化传入的值判断的。
at line 849
rsaCheckV2($params)
No description
at line 865
bool
verify($data, $sign, string $signType = 'RSA')
No description
at line 906
string
sdkExecute(object $request)
生成用于调用收银台SDK的字符串
at line 946
protected string
sign($data, string $signType = 'RSA2')
对数据进行加密
at line 982
protected mixed
curl($url, null $postFields = null)
No description
at line 1045
protected float
getMillisecond()
No description
at line 1058
protected bool
checkEmpty($value)
校验$value是否非空 if not set ,return true; if is null , return true;