{"id":20958528,"url":"https://github.com/junixapp/alipayutil","last_synced_at":"2025-06-19T00:03:40.519Z","repository":{"id":108524305,"uuid":"69550362","full_name":"junixapp/AlipayUtil","owner":"junixapp","description":"[不再维护!!!]支付宝支付SDK的封装，只需要调用一个方法，传入参数和回调接口即可，像请求网络一样简单！","archived":false,"fork":false,"pushed_at":"2017-08-18T07:34:40.000Z","size":387,"stargazers_count":58,"open_issues_count":1,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-14T06:43:24.713Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/junixapp.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}},"created_at":"2016-09-29T09:03:27.000Z","updated_at":"2022-08-09T12:31:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"27ede33a-db90-4244-aab7-2adec8e059f2","html_url":"https://github.com/junixapp/AlipayUtil","commit_stats":null,"previous_names":["junixapp/alipayutil"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/junixapp/AlipayUtil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junixapp%2FAlipayUtil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junixapp%2FAlipayUtil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junixapp%2FAlipayUtil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junixapp%2FAlipayUtil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junixapp","download_url":"https://codeload.github.com/junixapp/AlipayUtil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junixapp%2FAlipayUtil/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260654624,"owners_count":23042671,"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":[],"created_at":"2024-11-19T01:48:09.576Z","updated_at":"2025-06-19T00:03:35.499Z","avatar_url":"https://github.com/junixapp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlipayUtil\n支付宝支付SDK的封装，只需要调用一个方法，传入参数和回调接口即可，像请求网络一样简单！\n\n# Dependency [![](https://jitpack.io/v/li-xiaojun/AlipayUtil.svg)](https://jitpack.io/#li-xiaojun/AlipayUtil)\n\n### Gradle\n1. Add it in your root build.gradle at the end of repositories\n\n\t\tallprojects {\n\t\t\trepositories {\n\t\t\t\t...\n\t\t\t\tmaven { url \"https://jitpack.io\" }\n\t\t\t}\n\t\t}\n2. Add the dependency\n\n\t\tdependencies {\n\t        compile 'com.github.li-xiaojun:AlipayUtil:1.0.0'\n\t\t}\n\n### Maven\n1. Add the JitPack repository to your build file\n\t\t\n\t\t\u003crepositories\u003e\n\t\t\t\u003crepository\u003e\n\t\t\t    \u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t\t    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\t\t\u003c/repository\u003e\n\t\t\u003c/repositories\u003e\n2. Add the dependency\n\n\t\t\u003cdependency\u003e\n\t\t    \u003cgroupId\u003ecom.github.li-xiaojun\u003c/groupId\u003e\n\t\t    \u003cartifactId\u003eAlipayUtil\u003c/artifactId\u003e\n\t\t    \u003cversion\u003e1.0.0\u003c/version\u003e\n\t\t\u003c/dependency\u003e\n\n\n# Usage(Just in 2 steps!)\n1. 初始化合作者id和收款方支付宝账号\n\n\t\tAliPayHelper.init(\"\",\"\");\n2. 调用支付方法，传入参数\n\n\t\t//1.私钥签名串，不能放在本地做，需要让服务器提供接口返回，签名方法参考下面的sign方法\n        //2.由于签名放在服务器端，而且需要订单信息参数，因此我们客户端要将订单信息传递给服务器，如何\n        //生成订单信息也封装好了，调用AliPayHelper.getOrderInfo(),传入对应参数即可\n        String sign = \"\";\n\n        AliPayHelper.pay(this, \"测试商品\", \"商品描述\", \"0.1\", \"12313211\", sign, new AliPayHelper.PayResultCallback() {\n            @Override\n            public void onSuccess(PayResult payResult) {\n                //支付成功\n            }\n            @Override\n            public void onConfirming(PayResult payResult) {\n                //支付确认中\n            }\n            @Override\n            public void onCancel(PayResult payResult) {\n                //支付取消\n            }\n            @Override\n            public void onFail(PayResult payResult) {\n                //支付失败\n            }\n        });\n\n# Intro\n- 此封装支付方便我们进行支付宝SDK的调用，对于集成支付宝SDK的整体流程还是应该了解一下，事先配置好公钥参数，并且理解签名串应该放到服务器端做，让服务器端提供接口返回签名信息即可。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunixapp%2Falipayutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunixapp%2Falipayutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunixapp%2Falipayutil/lists"}