C# Class Senparc.Weixin.MP.Helpers.JSSDKHelper

ファイルを表示 Open project: JeffreySu/WeiXinMPSDK Class Usage Examples

Public Methods

Method Description
GetAddrSign ( string appId, string appSecret, string noncestr, string timestamp, string url ) : string

获取位置签名AddrSign

GetCardSign ( string appId, string appSecret, string locationId, string noncestr, string timestamp, string cardId, string cardType ) : string

获取卡券签名CardSign

GetJsSdkUiPackage ( string appId, string appSecret, string url ) : Senparc.Weixin.MP.Helpers.JsSdkUiPackage

获取给UI使用的JSSDK信息包

GetNoncestr ( ) : string

获取随机字符串

GetSignature ( string ticket, string noncestr, string timestamp, string url ) : string

获取JS-SDK权限验证的签名Signature

GetTimestamp ( ) : string

获取时间戳

GetcardExtSign ( string api_ticket, string timestamp, string card_id, string nonce_str, string code = "", string openid = "" ) : string

获取添加卡券时Ext参数内的签名

Private Methods

Method Description
CreateCardSha1 ( Hashtable parameters ) : string

生成cardSign的加密方法

CreateNonekeySha1 ( Hashtable parameters ) : string

添加卡券Ext参数的签名加密方法

CreateSha1 ( Hashtable parameters ) : string

sha1加密

Method Details

GetAddrSign() public static method

获取位置签名AddrSign
public static GetAddrSign ( string appId, string appSecret, string noncestr, string timestamp, string url ) : string
appId string
appSecret string
noncestr string
timestamp string
url string
return string

GetCardSign() public static method

获取卡券签名CardSign
public static GetCardSign ( string appId, string appSecret, string locationId, string noncestr, string timestamp, string cardId, string cardType ) : string
appId string
appSecret string
locationId string
noncestr string
timestamp string
cardId string
cardType string
return string

GetJsSdkUiPackage() public static method

获取给UI使用的JSSDK信息包
public static GetJsSdkUiPackage ( string appId, string appSecret, string url ) : Senparc.Weixin.MP.Helpers.JsSdkUiPackage
appId string
appSecret string
url string
return Senparc.Weixin.MP.Helpers.JsSdkUiPackage

GetNoncestr() public static method

获取随机字符串
public static GetNoncestr ( ) : string
return string

GetSignature() public static method

获取JS-SDK权限验证的签名Signature
public static GetSignature ( string ticket, string noncestr, string timestamp, string url ) : string
ticket string
noncestr string
timestamp string
url string
return string

GetTimestamp() public static method

获取时间戳
public static GetTimestamp ( ) : string
return string

GetcardExtSign() public static method

获取添加卡券时Ext参数内的签名
public static GetcardExtSign ( string api_ticket, string timestamp, string card_id, string nonce_str, string code = "", string openid = "" ) : string
api_ticket string
timestamp string
card_id string
nonce_str string
code string
openid string
return string