asp 一些支付接口(45)


    sbOld = sbOld + userId
    sbOld = sbOld + MP
    sbOld = sbOld + bType

    getCallbackHmacString = HMAC(sbOld,keyValue)

End Function

Function CheckHmac(sCmd,sErrorCode,sTrxId,orderId,amount,productId,userId,MP,bType,hmac)
    if(hmac=getCallbackHmacString(sCmd,sErrorCode,sTrxId,orderId,amount,productId,userId,MP,bType)) Then
        CheckHmac = True
    ELSE
        CheckHmac = Flase
    END IF
End Function

'取得返回串中的所有参数
Sub getCallBackValue(ByRef sCmd,ByRef sErrorCode,ByRef sTrxId,ByRef amount,ByRef cur,ByRef productId,ByRef orderId,ByRef userId,ByRef MP,ByRef bType,ByRef svrHmac)
    sCmd = Request.QueryString("r0_Cmd")
    sErrorCode = Request.QueryString("r1_Code")
    sTrxId = Request.QueryString("r2_TrxId")
    amount = Request.QueryString("r3_Amt")
    cur = Request.QueryString("r4_Cur")
    productId = Request.QueryString("r5_Pid")
    orderId = Request.QueryString("r6_Order")
    userId = Request.QueryString("r7_Uid")
    MP = Request.QueryString("r8_MP")
    bType = Request.QueryString("r9_BType")     
    svrHmac = Request.QueryString("hmac")
End Sub

%>