René's URL Explorer Experiment


Title: weixin-java-pay 3.8.0支付回调验签失败 · Issue #1671 · binarywang/WxJava · GitHub

Open Graph Title: weixin-java-pay 3.8.0支付回调验签失败 · Issue #1671 · binarywang/WxJava

X Title: weixin-java-pay 3.8.0支付回调验签失败 · Issue #1671 · binarywang/WxJava

Description: 我从3.7.0升到3.8.0发现支付回调验签失败,原因就是从回调报文里取到的signType为null导致sign不对 报文为 String xmlData = "\n" + "\n" + "\n" + "

Open Graph Description: 我从3.7.0升到3.8.0发现支付回调验签失败,原因就是从回调报文里取到的signType为null导致sign不对 报文为 String xmlData = "\n" + "\n" + "

X Description: 我从3.7.0升到3.8.0发现支付回调验签失败,原因就是从回调报文里取到的signType为null导致sign不对 报文为 String xmlData = "<xml><appid><![CDATA[wx5c142********]]></appid>\n" + "<bank_type><!...

Opengraph URL: https://github.com/binarywang/WxJava/issues/1671

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"weixin-java-pay 3.8.0支付回调验签失败","articleBody":"我从3.7.0升到3.8.0发现支付回调验签失败,原因就是从回调报文里取到的signType为null导致sign不对\r\n\r\n报文为\r\n```\r\nString xmlData = \"\u003cxml\u003e\u003cappid\u003e\u003c![CDATA[wx5c142********]]\u003e\u003c/appid\u003e\\n\" +\r\n                \"\u003cbank_type\u003e\u003c![CDATA[OTHERS]]\u003e\u003c/bank_type\u003e\\n\" +\r\n                \"\u003ccash_fee\u003e\u003c![CDATA[2000]]\u003e\u003c/cash_fee\u003e\\n\" +\r\n                \"\u003cfee_type\u003e\u003c![CDATA[CNY]]\u003e\u003c/fee_type\u003e\\n\" +\r\n                \"\u003cis_subscribe\u003e\u003c![CDATA[Y]]\u003e\u003c/is_subscribe\u003e\\n\" +\r\n                \"\u003cmch_id\u003e\u003c![CDATA[158*****]]\u003e\u003c/mch_id\u003e\\n\" +\r\n                \"\u003cnonce_str\u003e\u003c![CDATA[1594782996522]]\u003e\u003c/nonce_str\u003e\\n\" +\r\n                \"\u003copenid\u003e\u003c![CDATA[oE4SP*************]]\u003e\u003c/openid\u003e\\n\" +\r\n                \"\u003cout_trade_no\u003e\u003c![CDATA[2020**********]]\u003e\u003c/out_trade_no\u003e\\n\" +\r\n                \"\u003cresult_code\u003e\u003c![CDATA[SUCCESS]]\u003e\u003c/result_code\u003e\\n\" +\r\n                \"\u003creturn_code\u003e\u003c![CDATA[SUCCESS]]\u003e\u003c/return_code\u003e\\n\" +\r\n                \"\u003csign\u003e\u003c![CDATA[474CB1037F020276A242F7AC0410D7BB0F3CEB34AEA97F89EEB67B659649FF84]]\u003e\u003c/sign\u003e\\n\" +\r\n                \"\u003ctime_end\u003e\u003c![CDATA[20200715111648]]\u003e\u003c/time_end\u003e\\n\" +\r\n                \"\u003ctotal_fee\u003e2000\u003c/total_fee\u003e\\n\" +\r\n                \"\u003ctrade_type\u003e\u003c![CDATA[JSAPI]]\u003e\u003c/trade_type\u003e\\n\" +\r\n                \"\u003ctransaction_id\u003e\u003c![CDATA[4200000592************]]\u003e\u003c/transaction_id\u003e\\n\" +\r\n                \"\u003c/xml\u003e\";\r\n```\r\n\r\n* 3.7.0\r\n```\r\n@Override\r\n  public WxPayOrderNotifyResult parseOrderNotifyResult(String xmlData) throws WxPayException {\r\n    try {\r\n      log.debug(\"微信支付异步通知请求参数:{}\", xmlData);\r\n      WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData);\r\n      log.debug(\"微信支付异步通知请求解析后的对象:{}\", result);\r\n      // 这里的signType 不是应该取 微信传过来的signType么?\r\n      **result.checkResult(this, this.getConfig().getSignType(), false);**\r\n      return result;\r\n    } catch (WxPayException e) {\r\n      throw e;\r\n    } catch (Exception e) {\r\n      throw new WxPayException(\"发生异常!\", e);\r\n    }\r\n  }\r\n```\r\n\r\n* 3.8.0\r\n```\r\n@Override\r\n  public WxPayOrderNotifyResult parseOrderNotifyResult(String xmlData) throws WxPayException {\r\n    try {\r\n      log.debug(\"微信支付异步通知请求参数:{}\", xmlData);\r\n      WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData);\r\n      log.debug(\"微信支付异步通知请求解析后的对象:{}\", result);\r\n      **result.checkResult(this, result.getSignType(), false);**\r\n      return result;\r\n    } catch (WxPayException e) {\r\n      throw e;\r\n    } catch (Exception e) {\r\n      throw new WxPayException(\"发生异常!\", e);\r\n    }\r\n  }\r\n```\r\n\r\n此处如果只从报文里面取是不是不太合适,报文里面是可能没有的,和公众号文档写的不太一样,改成从报文取不到就从配置文件取会不会好点","author":{"url":"https://github.com/bozer666","@type":"Person","name":"bozer666"},"datePublished":"2020-07-16T03:14:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1671/WxJava/issues/1671"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b5ce9457-1ef9-94ce-ee5d-311076f057be
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCEEC:29F431:224AF15:2ECB579:6964C88B
html-safe-nonce6a9b7050b61e80a34f93d7207a1782d6c8606a0933e31560efc50ea5d99f90af
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUVDOjI5RjQzMToyMjRBRjE1OjJFQ0I1Nzk6Njk2NEM4OEIiLCJ2aXNpdG9yX2lkIjoiMzgxMjE4Mzk4Njk2MzUzMTkxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6e8bb3c874ed3ec32ecd1cef52ded2adeeacf9473265f4d21f1a97678c1c0e67
hovercard-subject-tagissue:657809338
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/binarywang/WxJava/1671/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cdfa97616b25876faa3180f2a5be97387d4ee09298b2e8f91b36427d861b3734/binarywang/WxJava/issues/1671
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cdfa97616b25876faa3180f2a5be97387d4ee09298b2e8f91b36427d861b3734/binarywang/WxJava/issues/1671
og:image:alt我从3.7.0升到3.8.0发现支付回调验签失败,原因就是从回调报文里取到的signType为null导致sign不对 报文为 String xmlData = "\n" + "\n" + "
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebozer666
hostnamegithub.com
expected-hostnamegithub.com
None5838582163a1256e5ebd5086b7e1dc5cea93d82086c9c8b1395fb50f6ddab28d
turbo-cache-controlno-preview
go-importgithub.com/binarywang/WxJava git https://github.com/binarywang/WxJava.git
octolytics-dimension-user_id1343140
octolytics-dimension-user_loginbinarywang
octolytics-dimension-repository_id49122742
octolytics-dimension-repository_nwobinarywang/WxJava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49122742
octolytics-dimension-repository_network_root_nwobinarywang/WxJava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8f997e7f84bd1db9537ba403fa68be0da3423594
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/binarywang/WxJava/issues/1671#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbinarywang%2FWxJava%2Fissues%2F1671
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbinarywang%2FWxJava%2Fissues%2F1671
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=binarywang%2FWxJava
Reloadhttps://github.com/binarywang/WxJava/issues/1671
Reloadhttps://github.com/binarywang/WxJava/issues/1671
Reloadhttps://github.com/binarywang/WxJava/issues/1671
binarywang https://github.com/binarywang
WxJavahttps://github.com/binarywang/WxJava
Please reload this pagehttps://github.com/binarywang/WxJava/issues/1671
Notifications https://github.com/login?return_to=%2Fbinarywang%2FWxJava
Fork 9k https://github.com/login?return_to=%2Fbinarywang%2FWxJava
Star 32.4k https://github.com/login?return_to=%2Fbinarywang%2FWxJava
Code https://github.com/binarywang/WxJava
Issues 17 https://github.com/binarywang/WxJava/issues
Pull requests 4 https://github.com/binarywang/WxJava/pulls
Discussions https://github.com/binarywang/WxJava/discussions
Actions https://github.com/binarywang/WxJava/actions
Wiki https://github.com/binarywang/WxJava/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/binarywang/WxJava/security
Please reload this pagehttps://github.com/binarywang/WxJava/issues/1671
Insights https://github.com/binarywang/WxJava/pulse
Code https://github.com/binarywang/WxJava
Issues https://github.com/binarywang/WxJava/issues
Pull requests https://github.com/binarywang/WxJava/pulls
Discussions https://github.com/binarywang/WxJava/discussions
Actions https://github.com/binarywang/WxJava/actions
Wiki https://github.com/binarywang/WxJava/wiki
Security https://github.com/binarywang/WxJava/security
Insights https://github.com/binarywang/WxJava/pulse
New issuehttps://github.com/login?return_to=https://github.com/binarywang/WxJava/issues/1671
New issuehttps://github.com/login?return_to=https://github.com/binarywang/WxJava/issues/1671
weixin-java-pay 3.8.0支付回调验签失败https://github.com/binarywang/WxJava/issues/1671#top
微信支付https://github.com/binarywang/WxJava/issues?q=state%3Aopen%20label%3A%22%E5%BE%AE%E4%BF%A1%E6%94%AF%E4%BB%98%22
https://github.com/bozer666
https://github.com/bozer666
bozer666https://github.com/bozer666
on Jul 16, 2020https://github.com/binarywang/WxJava/issues/1671#issue-657809338
微信支付https://github.com/binarywang/WxJava/issues?q=state%3Aopen%20label%3A%22%E5%BE%AE%E4%BF%A1%E6%94%AF%E4%BB%98%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.