{"id":16489098,"url":"https://github.com/thundernet8/alipayorderssupervisor","last_synced_at":"2025-04-07T15:11:19.309Z","repository":{"id":79658102,"uuid":"81424592","full_name":"thundernet8/AlipayOrdersSupervisor","owner":"thundernet8","description":":sparkles: 使用Node监视支付宝订单，即时通知服务器以实现免签约支付接口","archived":false,"fork":false,"pushed_at":"2018-02-12T10:44:02.000Z","size":75,"stargazers_count":375,"open_issues_count":6,"forks_count":92,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-03-31T14:11:49.032Z","etag":null,"topics":["alipay","nodejs","spider"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thundernet8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-09T07:57:10.000Z","updated_at":"2025-03-19T14:46:01.000Z","dependencies_parsed_at":"2023-05-14T07:00:14.505Z","dependency_job_id":null,"html_url":"https://github.com/thundernet8/AlipayOrdersSupervisor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundernet8%2FAlipayOrdersSupervisor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundernet8%2FAlipayOrdersSupervisor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundernet8%2FAlipayOrdersSupervisor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundernet8%2FAlipayOrdersSupervisor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thundernet8","download_url":"https://codeload.github.com/thundernet8/AlipayOrdersSupervisor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675609,"owners_count":20977378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alipay","nodejs","spider"],"created_at":"2024-10-11T13:43:03.212Z","updated_at":"2025-04-07T15:11:19.275Z","avatar_url":"https://github.com/thundernet8.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n## Alipay Orders Supervisor\n\n**支付宝免签约支付接口实现脚本 - NodeJS 版本 .**\n\n[![GitHub issues](https://img.shields.io/github/issues/thundernet8/AlipayOrdersSupervisor.svg)](https://github.com/thundernet8/AlipayOrdersSupervisor/issues)\n[![GitHub forks](https://img.shields.io/github/forks/thundernet8/AlipayOrdersSupervisor.svg)](https://github.com/thundernet8/AlipayOrdersSupervisor/network)\n[![GitHub stars](https://img.shields.io/github/stars/thundernet8/AlipayOrdersSupervisor.svg)](https://github.com/thundernet8/AlipayOrdersSupervisor/stargazers)\n[![dependency status](https://img.shields.io/david/thundernet8/AlipayOrdersSupervisor.svg?maxAge=3600\u0026style=flat)](https://david-dm.org/thundernet8/AlipayOrdersSupervisor)\n[![Build Status](https://travis-ci.org/thundernet8/AlipayOrdersSupervisor.svg?branch=master)](https://travis-ci.org/thundernet8/AlipayOrdersSupervisor)\n[![GitHub license](https://img.shields.io/github/license/thundernet8/AlipayOrdersSupervisor.svg)](https://github.com/thundernet8/AlipayOrdersSupervisor/blob/master/LICENSE)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n## Update 2018.2\n\n目前支付宝已经加强了登录的校验，极大影响工具便利性，现在推出了另一种解决方案，见[利用有赞云和有赞微小店实现个人收款解决方案](https://github.com/thundernet8/YouzanPayPortal)提供一种思路参考，可以直接按此仓库使用的方法应用到自己的系统中，或使用该仓库作为一个独立的服务.\n\n## GUI 版 (Update 2017-08-17)\n\n现已推出 GUI 版客户端，由 Java+Swing 编写，项目地址[AlipayOrdersSupervisor-GUI](https://github.com/thundernet8/AlipayOrdersSupervisor-GUI)\n\n## 功能介绍\n\n通过 NodeJS 爬取个人支付宝交易订单列表，分析订单中的备注，然后将订单数据推送至指定服务器，实现支付宝交易接口\n\n自带了简单的日志和邮件通知功能，对系统异常及时报告以及记录\n\n## 如何使用\n\n* 1. 请配置`lib/config.js`中的参数，如邮件 SMTP，推送服务器地址，以及`pushStateSecret`，`alipayCookies`等。\n\n`pushStateSecret`用于数据的加盐保证安全以及验证推送来源的合法性\n\n`pushAppId`和`pushAppKey`暂时无用\n\n`alipayCookies`必须填写，这是为了爬取订单时保证登录状态\n\n* 2. 安装必要的 npm 包\n\n```\nnpm install\n```\n\n* 3. 使用`forever`循环运行脚本\n\n```typescript\nforever start index.js\n```\n\n或者使用 script\n\n```typescript\nnpm start\n```\n\n脚本会每分钟爬取一次订单列表\n\n* 4. 服务端处理\n\n请参考脚本中利用`pushStateSecret`生成签名的方法，验证数据合法性后进行业务处理\n\n注 : 服务端返回`success`文本后会将对应记录标记为已处理，后续不会再次推送\n\n## 使用 Tips\n\n目前该脚本已在我的个人网站 webapproach.net/shop 上稳定生产运行，对于 cookies 过期问题，从上一次 2017 年 2 月 25 日更换 cookies 起至今 (2017 年 6 月 13 日 )，已持续 3 个半月未遭遇 cookies 过期问题。因此可能建议：\n\n* 没事不要去登录访问网页版的订单界面，当你关闭网页或网页上直接退出或者在网页停留过久无操作可能会触发服务端 session 更新 cookies 内容失效\n\n## License\n\nAlipayOrdersSupervisor is freely distributable under the terms of the\n[MIT license](https://github.com/thundernet8/AlipayOrdersSupervisor/blob/master/LICENSE).\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fthundernet8%2FAlipayOrdersSupervisor.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fthundernet8%2FAlipayOrdersSupervisor?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthundernet8%2Falipayorderssupervisor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthundernet8%2Falipayorderssupervisor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthundernet8%2Falipayorderssupervisor/lists"}