forked from RxReader/alipay_kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.md
143 lines (105 loc) · 3.86 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# alipay_kit
[](https://github.com/rxreader/alipay_kit/releases)
[](https://pub.dartlang.org/packages/alipay_kit)
[](https://github.com/rxreader/alipay_kit/blob/master/LICENSE)
flutter版支付宝SDK
## fake 系列 libraries
* [flutter版微信SDK](https://github.com/rxreader/wechat_kit)
* [flutter版腾讯(QQ)SDK](https://github.com/rxreader/tencent_kit)
* [flutter版新浪微博SDK](https://github.com/rxreader/weibo_kit)
* [flutter版支付宝SDK](https://github.com/rxreader/alipay_kit)
* [flutter版walle渠道打包工具](https://github.com/rxreader/walle_kit)
## dart/flutter 私服
* [simple_pub_server](https://github.com/rxreader/simple_pub_server)
## docs
* [蚂蚁金服开放平台](https://openhome.alipay.com/platform/appManage.htm)
* [支付宝支付](https://docs.open.alipay.com/204/105051/)
* [支付宝登录](https://docs.open.alipay.com/218/105329/)
* [应用签名工具](https://opendocs.alipay.com/open/common/104062)
## android
```groovy
buildscript {
dependencies {
// Android 11兼容,需升级Gradle到3.5.4/3.6.4/4.x.y
classpath 'com.android.tools.build:gradle:3.5.4'
}
}
```
```
# 不需要做任何额外接入工作
# 混淆已打入 Library,随 Library 引用,自动添加到 apk 打包混淆
```
#### UTDID冲突的问题解决方案
```shell
java.lang.RuntimeException: Duplicate class com.ta.utdid2.a.a.a found in modules alicloud-android-utdid-2.5.1-proguard.jar
```
```groovy
rootProject.subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.aliyun.ams' && details.requested.name == 'alicloud-android-utdid') {
// 用已存在的包替换掉冲突包
details.useTarget group: 'androidx.annotation', name: 'annotation', version: '1.1.0'
}
}
}
}
```
#### 获取 android 微信签名信息
非官方方法 -> 反编译 GenSignature_0630.apk 所得
命令:
```shell
keytool -list -v -keystore ${your_keystore_path} -storepass ${your_keystore_password} 2>/dev/null | grep -p 'MD5:.*' -o | sed 's/MD5://' | sed 's/ //g' | sed 's/://g' | awk '{print tolower($0)}'
```
示例:
```shell
keytool -list -v -keystore example/android/app/infos/dev.jks -storepass 123456 2>/dev/null | grep -p 'MD5:.*' -o | sed 's/MD5://' | sed 's/ //g' | sed 's/://g' | awk '{print tolower($0)}'
```
```shell
28424130a4416d519e00946651d53a46
```
## ios
```
在Xcode中,选择你的工程设置项,选中“TARGETS”一栏,在“info”标签栏的“URL type“添加“URL scheme”为你所注册的应用程序id
URL Types
alipay: identifier=alipay schemes=${your app scheme name} # schemes 不能为纯数字,推荐:alipay${appId}
```
```
iOS 9系统策略更新,限制了http协议的访问,此外应用需要在“Info.plist”中将要使用的URL Schemes列为白名单,才可正常检查其他应用是否安装。
<key>LSApplicationQueriesSchemes</key>
<array>
<string>alipay</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
```
## flutter
* break change
* 3.0.0: 重构
* 2.2.0: Alipay 单例
* 2.1.0: nullsafety & 不再支持 Android embedding v1
* snapshot
```
dependencies:
alipay_kit:
git:
url: https://github.com/rxreader/alipay_kit.git
```
* release
```
dependencies:
alipay_kit: ^${latestTag}
```
```
dependencies:
# 请不要加 ^
# 请不要进行配置 iOS 相关配置,否则 Apple Store 审核时会拒绝
alipay_kit: ${latestTag}-Android-Only
```
* example
[示例](./example/lib/main.dart)
## Star History
