{"id":19520183,"url":"https://github.com/dai1254473705/react-native-alipay","last_synced_at":"2025-06-13T13:38:11.435Z","repository":{"id":125122008,"uuid":"140056650","full_name":"dai1254473705/react-native-alipay","owner":"dai1254473705","description":"使用react-native-yunpeng-alipay 支付宝支付demo","archived":false,"fork":false,"pushed_at":"2018-07-07T08:38:48.000Z","size":293,"stargazers_count":7,"open_issues_count":1,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-26T07:35:33.391Z","etag":null,"topics":["alipay","android","ios","react","react-native","zhi-fu-bao"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/dai1254473705.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":"2018-07-07T05:51:54.000Z","updated_at":"2024-06-24T09:44:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"764ca42f-1f8e-4602-bb40-04ac07176c9b","html_url":"https://github.com/dai1254473705/react-native-alipay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dai1254473705/react-native-alipay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Freact-native-alipay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Freact-native-alipay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Freact-native-alipay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Freact-native-alipay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dai1254473705","download_url":"https://codeload.github.com/dai1254473705/react-native-alipay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai1254473705%2Freact-native-alipay/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259654267,"owners_count":22890979,"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","android","ios","react","react-native","zhi-fu-bao"],"created_at":"2024-11-11T00:24:13.503Z","updated_at":"2025-06-13T13:38:11.413Z","avatar_url":"https://github.com/dai1254473705.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-alipay\n使用react-native-yunpeng-alipay 支付宝支付demo\n\n\n\n\u003e + \"react-native\": \"0.51.0\",\n\u003e + \"react-native-yunpeng-alipay\": \"^2.0.0\"\n\n### 链接\n [react-native 中文网](https://reactnative.cn/docs/0.51/getting-started.html)\n [react-native-yunpeng-alipay](https://www.npmjs.com/package/react-native-yunpeng-alipay)\n\n\n\u003e 下载\n + `git clone https://github.com/dai1254473705/react-native-alipay.git`\n + `yarn install`\n + 修改`node_modules/react-native-yupeng-alipay/android/src/main/java/com/yunpeng/alipay/AlipayPackage`为如下所示：\n \n ```\n/**\n * Created by m2mbob on 16/5/6.\n */\npublic class AlipayPackage implements ReactPackage {\n\n    @Override\n    public List\u003cNativeModule\u003e createNativeModules(ReactApplicationContext reactContext) {\n        List\u003cNativeModule\u003e modules = new ArrayList\u003c\u003e();\n        modules.add(new AlipayModule(reactContext));\n        return modules;\n    }\n\n//    @Override\n//    public List\u003cClass\u003c? extends JavaScriptModule\u003e\u003e createJSModules() {\n//        return Collections.emptyList();\n//    }\n\n    @Override\n    public List\u003cViewManager\u003e createViewManagers(ReactApplicationContext reactContext) {\n        return Collections.emptyList();\n    }\n}\n\n```\n\n### app.js\n\n在根目录下的app.js中，`Alipay.pay(data)`中的data是服务端生成的订单信息，需要先调用一个接口请求，然后才可以进行\n支付调用，APP.js中为了方便，我直接写死了一个可用的数据测试Android，ios都通过了，然后注释掉了data，因此当前项目是可亲测可用的！！！\n\n```\n Alipay.pay(data).then(function(data){\n            console.log(data);\n        }, function (err) {\n            //没有安装支付宝APP\n            console.log(err);\n        });\n```\n\n### 具体安装配置流程\n\nreact-native-yunpeng-alipay:https://www.jianshu.com/p/d4388eba45cf\n\n原生android:https://www.jianshu.com/p/e2026db4fa22","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdai1254473705%2Freact-native-alipay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdai1254473705%2Freact-native-alipay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdai1254473705%2Freact-native-alipay/lists"}