{"id":29259105,"url":"https://github.com/birjemin/qqenvelop","last_synced_at":"2025-07-04T06:14:05.741Z","repository":{"id":57560853,"uuid":"327538512","full_name":"Birjemin/qqenvelop","owner":"Birjemin","description":"qq红包","archived":false,"fork":false,"pushed_at":"2021-01-14T08:45:40.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T07:40:36.572Z","etag":null,"topics":["envelop","qq"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Birjemin.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}},"created_at":"2021-01-07T07:39:17.000Z","updated_at":"2022-11-09T18:10:43.000Z","dependencies_parsed_at":"2022-09-01T12:21:17.955Z","dependency_job_id":null,"html_url":"https://github.com/Birjemin/qqenvelop","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Birjemin/qqenvelop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fqqenvelop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fqqenvelop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fqqenvelop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fqqenvelop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Birjemin","download_url":"https://codeload.github.com/Birjemin/qqenvelop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fqqenvelop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263457304,"owners_count":23469302,"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":["envelop","qq"],"created_at":"2025-07-04T06:14:04.535Z","updated_at":"2025-07-04T06:14:05.714Z","avatar_url":"https://github.com/Birjemin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## qqenvelop-qq红包\n\n[![Build Status](https://travis-ci.com/Birjemin/qqenvelop.svg?branch=master)](https://travis-ci.com/Birjemin/qqenvelop) \n[![Go Report Card](https://goreportcard.com/badge/github.com/birjemin/qqenvelop)](https://goreportcard.com/report/github.com/birjemin/qqenvelop) \n[![codecov](https://codecov.io/gh/Birjemin/qqenvelop/branch/master/graph/badge.svg)](https://codecov.io/gh/Birjemin/qqenvelop)\n\n\n[开发者中心](https://mp.qpay.tenpay.com/buss/wiki/221/1219)\n\n### 引入方式\n```\ngo get github.com/birjemin/qqenvelop\n```\n\n### 接口列表\n\n- [创建红包](https://mp.qpay.tenpay.com/buss/wiki/221/1220) ✅\n- [领取红包通知（只处理校验）](https://mp.qpay.tenpay.com/buss/wiki/221/1223) ✅\n- [对账单下载（只生成下载链接）](https://mp.qpay.tenpay.com/buss/wiki/221/1224) ✅\n- [红包详情](https://mp.qpay.tenpay.com/buss/wiki/221/2174) ✅\n\n\n### 使用方式\n\n```golang\n\ncert, err := tls.LoadX509KeyPair(\"client.crt\", \"client.key\")\nif err != nil {\n    panic(err)\n}\n\ncTLS := \u0026utils.HTTPClient{\n    Client: \u0026http.Client{\n        Timeout: 5 * time.Second,\n        Transport: \u0026http.Transport{\n            TLSClientConfig: \u0026tls.Config{\n                Certificates: []tls.Certificate{\n                    cert,\n                },\n            },\n        },\n    },\n}\n\n// 发送红包\nsendObj := SendQPayHb{\n    MchID:       \"商户号\",\n    MchName:     \"商户名称\",\n    AppSecret:   \"app_secret\",\n    HTTPRequest: cTLS,\n}\n\nparams := ParamsSendQPayHb{\n    TotalAmount: 1,\n    Wishing:     \"新年好\",\n    ActName:     \"新年活动\",\n    IconID:      23,\n}\n\n// success\nret, err := sendObj.SendQPayHb(\"open_id\", params)\nif err != nil {\n    panic(err)\n}\nlog.Print(\"ret: \", ret)\n\n// 查看详情\nc := \u0026utils.HTTPClient{\n    Client: \u0026http.Client{\n        Timeout: 5 * time.Second,\n    },\n}\n\nobj := QPayHbDetail{\n    MchID:       \"mch_id\",\n    AppSecret:   \"app_secret\",\n    HTTPRequest: c,\n}\n\nparams := ParamsQPayHbDetail{\n    ListID: \"101000000502201506300000100001\",\n}\n\n// success\nret, err := obj.GetDetail(params)\nif err != nil {\n    panic(err)\n}\nlog.Print(\"ret: \", ret)\n\n// 获取下载链接URL(使用cTLS，或者自定义下载即可)\nnotify := DownloadQPayHb{\n    AppSecret: \"app_secret\",\n}\n\ndownloadURL := notify.GetDownloadURL(20210109)\n\n// 处理回调校验\nret, err := notify.Parse(data)\nif err != nil {\n    panic(err.Error())\n}\ncheck := notify.CheckSign(ret)\nlog.Print(\"ret: \", check, ret)\n```\n\n### 测试\n- 测试\n    ```\n    go test\n    ```\n- 格式化代码\n    ```\n    golint\n    ```\n- 覆盖率\n    ```\n    go test -cover\n    go test -coverprofile=coverage.out \n    go tool cover -html=coverage.out\n    ```\n\n### 备注\n无","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirjemin%2Fqqenvelop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbirjemin%2Fqqenvelop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirjemin%2Fqqenvelop/lists"}