点金计划MD5值计算?

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:15 2097 0 全屏看文

AI助手支持GPT4.0

点金计划MD5值计算?

根据文档描述

点金计划页面打开时,页面上方的 iframe 框架会请求服务商填写的商家小票链接,会在链接后附

上:“特约商户号(sub_mch_id)”、“商户订单号(out_trade_no)”、“md5 校验码

(check_code)”三个字段的信息,方便服务商快速定位到具体订单的同时,也保证链接的可靠

性。

a)  增加参数后的链接格式为:

服务商链接?sub_mch_id=特约商户号&out_trade_no=商户订单号&check_code=

b)  举例:

若服务商配置的链接为 https://www.qq.com,特约商户号为 1234567,商户订单号为

ABCDEFG,则请求的链接为

https://www.qq.com?sub_mch_id=1234567&out_trade_no=ABCDEFG&check_code=

39f0876dd58e4eb61b66250f69d02705

2) 服务商校验 check_code

服务商获取到上述完整链接时,为了保证参数没有被篡改,需要做 MD5 校验。

a)  校验方式

通过链接上的“商户订单号”,到后台获取该订单对应的“微信订单号”,即 transaction_id,

并拼在原有链接后(需去除 check_code,即:服务商链接?sub_mch_id=特约商户号

&out_trade_no=商户订单号&transaction_id=),进行 MD5 计算。

b)  举例

若 transaction_id 为 abcdefg,则 MD5 值为:

String my_check_code =

MD5(“https://www.qq.com?sub_mch_id=1234567&out_trade_no=ABCDEFG&transactio

n_id=abcdefg”);

若 my_check_code 与最初链接参数中的 check_code 相等,说明该链接未被篡改,可正常跳转

到商家小票内容,否则服务商需展示错误提示页


计算出来的MD5与返回的MD5不一致,是什么原因?有人遇到过吗,怎么解决的

According to the description of the document, when the page of the deposit plan opens, the iframe framework at the top of the page will ask the service provider to fill in the link with a link: "sub"_ mch_ ID) "and" merchant order number (out) "_ trade_ No "," MD5 check code (check)_ The information in the three fields is convenient for service providers to quickly locate specific orders and ensure the reliability of links. a) The link format after adding parameters is: Service Provider Link? Sub_ mch_ Id = merchant ID & out_ trade_ No = merchant order number & check_ Code = b) example: if the link configured by the service provider is https://www.qq.com , the merchant ID is 1234567, and the merchant order number is ABCDEFG, then the requested link is https://www.qq.com?sub_ mch_ id=1234567&out_ trade_ no=ABCDEFG&check_ Code = 39f0876dd58e4eb61b66250f69d02705 2) service provider check_ When the code service provider obtains the above complete link, it needs to do MD5 verification in order to ensure that the parameters are not tampered with. a) Through the "merchant order number" on the link, the "wechat order number" corresponding to the order can be obtained in the background, that is, transaction_ ID, and spell it after the original link (check needs to be removed_ Code: Service Provider Link? Sub_ mch_ Id = merchant ID & out_ trade_ No = merchant order number & Transaction_ Id =) for MD5 calculation. b) For example, if transaction_ If Id is ABCDEFG, the MD5 value is: String my_ check_ code = MD5(“ https://www.qq.com?sub_ mch_ id=1234567&out_ trade_ no=ABCDEFG&transactio n_ Id = ABCDEFG); if my_ check_ Code and check in the initial link parameter_ If the code is equal, it means that the link has not been tampered with and can jump to the content of the merchant ticket normally. Otherwise, the service provider needs to display an error prompt page. What is the reason for the inconsistency between the calculated MD5 and the returned MD5? Did anyone encounter it? How did you solve it

回答:

jf.wang:

助手都是干嘛的,不理人的?

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
企业微信还需要申请社交类目么?
无法绑定手机号,请问如何处理?
企业微信加人和加群频次和上限有哪些?如何避免负荷过大会触发的违规问题?会出现哪些违规问题?
关于企业微信群发助手可以分享任意小程序网页的行为,是不是bug?
设置商家券事件通知地址API,返回无权限操作目标商户
随便看看
微信公众号免300认证教程 4962
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4080
小程序广告组件通过审核,但是小程序内没有显示广告? 4159
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8033
问题? 7263
如何快速搭建抽奖助手小程序(无需代码知识) 5047
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6002
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5518
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5214
如何解决渲染层网络错误Failed to load media? 16564