asp 一些支付接口(44)


        <input type="hidden" name="pd_FrpId" value="<%=frpId%>">        
        <input type="hidden" name="hmac" value="<%=sNewString%>">
    </form>
</body>
</html>


3.yeepayCommon.asp
复制代码 代码如下:

<%
    Dim mctSDK
    Dim nodeAuthorizationURL
    Dim messageType
    Dim addressFlag
    nodeAuthorizationURL = "https://www.yeepay.com/app-merchant-proxy/node"    '扣款请求URL 无需更改
    messageType="Buy"            '消息类型
    addressFlag="0"                '需要填写送货信息 0:不需要 1:需要

    
Function getReqHmacString(orderId,amount,cur,productId,productCat,productDesc,merchantCallbackURL,sMctProperties,frpId)
    Dim sbOld
    '进行加密串处理,一定按照下列顺序进行
    sbOld=""
    sbOld = sbOld + messageType
    sbOld = sbOld + merchantId
    sbOld = sbOld + orderId
    sbOld = sbOld + CStr(amount)        
    sbOld = sbOld + cur                    
    sbOld = sbOld + productId
    sbOld = sbOld + productCat
    sbOld = sbOld + productDesc
    sbOld = sbOld + merchantCallbackURL
    sbOld = sbOld + addressFlag
    sbOld = sbOld + sMctProperties
    sbOld = sbOld + frpId

    getReqHmacString = HMAC(sbOld,keyValue)

End Function

Function getCallbackHmacString(sCmd,sErrorCode,sTrxId,orderId,amount,productId,userId,MP,bType)
    Dim sbOld
    '取得加密前的字符串
    sbOld = ""
    sbOld = sbOld + CStr(merchantId)
    sbOld = sbOld + sCmd
    sbOld = sbOld + sErrorCode
    sbOld = sbOld + sTrxId
    sbOld = sbOld + amount
    sbOld = sbOld + cur
    sbOld = sbOld + productId
    sbOld = sbOld + orderId

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2294.html