{"id":19001714,"url":"https://github.com/ledccn/ledc-xhdpay","last_synced_at":"2026-02-03T14:32:00.314Z","repository":{"id":259825560,"uuid":"877241375","full_name":"ledccn/ledc-xhdpay","owner":"ledccn","description":"红小点支付（易生支付）","archived":false,"fork":false,"pushed_at":"2024-10-28T05:05:49.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T09:35:45.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ledccn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T10:28:31.000Z","updated_at":"2024-10-28T05:05:34.000Z","dependencies_parsed_at":"2024-10-28T07:29:58.881Z","dependency_job_id":"37c61158-b44c-4152-933b-14b8a5c75c1d","html_url":"https://github.com/ledccn/ledc-xhdpay","commit_stats":null,"previous_names":["ledccn/ledc-xhdpay"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ledccn/ledc-xhdpay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fledc-xhdpay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fledc-xhdpay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fledc-xhdpay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fledc-xhdpay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ledccn","download_url":"https://codeload.github.com/ledccn/ledc-xhdpay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fledc-xhdpay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-08T18:12:24.687Z","updated_at":"2026-02-03T14:32:00.299Z","avatar_url":"https://github.com/ledccn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 红小点支付（易生支付）\n\n## 安装\n\n`composer require ledc/xhdpay`\n\n## 使用\n\n开箱即用，只需要传入一个配置，初始化一个实例即可：\n\n```php\nuse Ledc\\XhdPay\\Config;\nuse Ledc\\XhdPay\\XhdPay;\n\n$env_config = [\n    'merchantNo' =\u003e '联合商户号',\n    'terminalNo' =\u003e '联合设备号',\n    'secretKey' =\u003e '密钥',\n    'enable' =\u003e '启用支付',\n    'debug' =\u003e '启用测试环境',\n    'notifyUrlPrefix' =\u003e '通知地址前缀，格式如：https://iyuu.cn/xhdpay/callback',\n];\n$config = new Config($env_config);\n$api = new XhdPay($config);\n```\n\n在创建实例后，所有的方法都可以有IDE自动补全；例如：\n\n```php\n// 获得完整的通知URL地址\n$notifyUrl = $config-\u003egetPayNotifyUrl($attach);\n\n// 验证签名（签名验证失败时，会抛出异常）\n$config-\u003everifySignature();\n\n// 统一支付下单\n$api-\u003epay();\n\n// 交易订单(退款)查询二合一接口\n$api-\u003equery();\n\n// 交易退款接口\n$api-\u003erefund();\n```\n\n## 捐赠\n\n![reward](reward.png)\n\n## 支付成功回调报文\n\n```json\n{\n  \"biz\": {\n    \"terminalNo\": \"联合设备号\",\n    \"orderNo\": \"网关订单号\",\n    \"merOrderNo\": \"商户订单号\",\n    \"bankCardType\": \"U\",\n    \"channelOrderNo\": \"渠道订单号（微信、支付宝...）\",\n    \"paidInfo\": {\n      \"billTime\": \"2024-10-23 16:13:54\",\n      \"bankCardType\": \"U\",\n      \"paidTime\": \"2024-10-23 16:13:54\",\n      \"buyerId\": \"用户openid\",\n      \"paidAmount\": \"1\"\n    },\n    \"buyerId\": \"用户openid\",\n    \"payableAmount\": \"1\",\n    \"orderAmount\": \"1\",\n    \"orderTime\": \"2024-10-23 16:13:47\",\n    \"notifyType\": \"Paid\",\n    \"orderDesc\": \"ISG--ISG BioSkin 賦活奇....\",\n    \"merchantNo\": \"联合商户号\",\n    \"status\": \"Completed\"\n  },\n  \"success\": 1,\n  \"sign\": \"32bd0227b2bb76c4d7260e048d4f11dd\"\n}\n```\n\n## 退款成功回调报文\n```json\n{\n  \"biz\": {\n    \"terminalNo\": \"联合设备号\",\n    \"orderNo\": \"网关订单号\",\n    \"merOrderNo\": \"商户订单号\",\n    \"bankCardType\": \"U\",\n    \"channelOrderNo\": \"渠道退款订单号（微信、支付宝...）\",\n    \"buyerId\": \"用户openid\",\n    \"payableAmount\": \"1\",\n    \"orderAmount\": \"1\",\n    \"orderTime\": \"2024-10-23 17:33:42\",\n    \"notifyType\": \"Refund\",\n    \"refundInfo\": {\n      \"refundOrderNo\": \"网关退货订单号\",\n      \"refundTime\": \"2024-10-28 11:56:52\",\n      \"refundStatus\": \"Success\",\n      \"merRefundOrderNo\": \"商户退货订单号\",\n      \"refundAmount\": \"1\"\n    },\n    \"orderDesc\": \"ISG--ISG BioSkin 賦活奇....\",\n    \"merchantNo\": \"联合商户号\",\n    \"status\": \"Closed\"\n  },\n  \"success\": 1,\n  \"sign\": \"d6b3a75c949cdd4cd73e9738b0c6fd3c\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledccn%2Fledc-xhdpay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fledccn%2Fledc-xhdpay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledccn%2Fledc-xhdpay/lists"}