Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
c14f91d5
提交
c14f91d5
authored
6月 26, 2021
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
56ed099f
b2c95fea
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
109 行增加
和
46 行删除
+109
-46
PAYMENT_CN.md
doc/PAYMENT_CN.md
+66
-0
AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+1
-2
gradle.properties
example/android/gradle.properties
+0
-2
pubspec.lock
example/pubspec.lock
+20
-20
pubspec.yaml
example/pubspec.yaml
+1
-1
FluwxShareHandler.m
ios/Classes/FluwxShareHandler.m
+1
-1
share_models.dart
lib/src/share/share_models.dart
+1
-1
pubspec.lock
pubspec.lock
+19
-19
没有找到文件。
doc/PAYMENT_CN.md
浏览文件 @
c14f91d5
...
...
@@ -14,4 +14,70 @@ payWithWeChat(
);
```
## iOS 支付
*
配置
`URL Schemes`
,内容为应用的
`AppID`
, 可以登录微信开放平台查看。编辑
`ios/Runner/Info.plist`
```xml
<key>CFBundleURLSchemes</key>
<array>
<string>wx84cxxxxxx</string>
</array>
```
*
配置
`LSApplicationQueriesSchemes`
!
[
image-20210523140138835
](
https://gitee.com/inkkk0516/typora/raw/master/image-20210523140138835.png
)
*
使用
```dart
await fluwx.registerWxApi(
appId: "wx84cfexxxxxx",
universalLink: "https://www.xxxx.cn/app/");
fluwx.payWithWeChat(
appId: result['appid'],
partnerId: result['partnerid'],
prepayId: result['prepayid'],
packageValue: result['package'],
nonceStr: result['noncestr'],
timeStamp: result['timestamp'],
sign: result['sign'],
)
```
## 安卓支付
*
登录
[
微信开放平台
](
https://open.weixin.qq.com/cgi-bin/index?t=home/index&lang=zh_CN&token=f3443bb5b660c02dbbc86fb324adce3239e5ab22
)
,填写相关信息

*
根据
`应用包名`
生成
`应用签名`
[
点击这里下载应用签名工具
](
https://developers.weixin.qq.com/doc/oplatform/Downloads/Android_Resource.html
)
, 安装好签名工具后,输入应用包名就可以生成应用签名了

*
使用
```dart
// 注册
await fluwx.registerWxApi(
appId: "wx84cxxxxxx",
universalLink: "https://www.xxxx.cn/app/");
// 监听支付结果
fluwx.weChatResponseEventHandler.listen((event) async {
print(event.errCode);
// 支付成功
if (event.errCode == 0) {
}
// 关闭弹窗
});
```
更多信息还查看
[
支付文档
](
https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=11_1#
)
吧.
example/android/app/src/main/AndroidManifest.xml
浏览文件 @
c14f91d5
...
...
@@ -33,7 +33,7 @@
android:windowSoftInputMode=
"adjustResize"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
<intent-filter>
<action
android:name=
"${applicationId}.FlutterActivity"
/>
...
...
@@ -47,7 +47,6 @@
android:path=
"/"
android:scheme=
"wechatextmsg"
/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
...
...
example/android/gradle.properties
浏览文件 @
c14f91d5
org.gradle.jvmargs
=
-Xmx1536M
android.enableR8
=
true
android.useAndroidX
=
true
android.enableJetifier
=
true
\ No newline at end of file
example/pubspec.lock
浏览文件 @
c14f91d5
...
...
@@ -7,42 +7,42 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0
-nullsafety.3
"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0
-nullsafety.3
"
version: "2.1.0"
characters:
dependency: "direct main"
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0
-nullsafety.5
"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0
-nullsafety.3
"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0
-nullsafety.3
"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0
-nullsafety.5
"
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
...
...
@@ -56,7 +56,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0
-nullsafety.3
"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -73,28 +73,28 @@ packages:
path: ".."
relative: true
source: path
version: "3.
1.0-nullsafety.3
"
version: "3.
4.2
"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10
-nullsafety.3
"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0
-nullsafety.6
"
version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0
-nullsafety.3
"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
...
...
@@ -106,56 +106,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.
0-nullsafety.4
"
version: "1.8.
1
"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0
-nullsafety.6
"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0
-nullsafety.3
"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0
-nullsafety.3
"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0
-nullsafety.3
"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.
2.19-nullsafety.6
"
version: "0.
3.0
"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0
-nullsafety.5
"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0
-nullsafety.5
"
version: "2.1.0"
sdks:
dart: ">=2.12.
0-0.0
<3.0.0"
dart: ">=2.12.
4
<3.0.0"
flutter: ">=1.12.0"
example/pubspec.yaml
浏览文件 @
c14f91d5
...
...
@@ -3,7 +3,7 @@ description: Demonstrates how to use the fluwx plugin.
publish_to
:
'
none'
environment
:
sdk
:
"
>=2.12.
0-0
<3.0.0"
sdk
:
"
>=2.12.
4
<3.0.0"
dependencies
:
flutter
:
...
...
ios/Classes/FluwxShareHandler.m
浏览文件 @
c14f91d5
...
...
@@ -19,7 +19,7 @@ NSString *const fluwxKeyDescription = @"description";
NSString
*
const
fluwxKeyPackage
=
@"?package="
;
NSString
*
const
fluwxKeyMessageExt
=
@"messageExt"
;
NSString
*
const
fluwxKeyMediaTagName
=
@"mediaTagName
"
;
NSString
*
const
fluwxKeyMediaTagName
=
@"mediaTagName"
;
NSString
*
const
fluwxKeyMessageAction
=
@"messageAction"
;
NSString
*
const
fluwxKeyScene
=
@"scene"
;
...
...
lib/src/share/share_models.dart
浏览文件 @
c14f91d5
...
...
@@ -26,7 +26,7 @@ const String _thumbnail = "thumbnail";
const
String
_title
=
"title"
;
const
String
_description
=
"description"
;
const
String
_messageExt
=
"messageExt"
;
const
String
_mediaTagName
=
"mediaTagName
"
;
const
String
_mediaTagName
=
"mediaTagName"
;
const
String
_messageAction
=
"messageAction"
;
const
String
_compressThumbnail
=
"compressThumbnail"
;
...
...
pubspec.lock
浏览文件 @
c14f91d5
...
...
@@ -7,49 +7,49 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0
-nullsafety.3
"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0
-nullsafety.3
"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0
-nullsafety.5
"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0
-nullsafety.3
"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0
-nullsafety.3
"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0
-nullsafety.5
"
version: "1.15.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0
-nullsafety.3
"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -66,21 +66,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10
-nullsafety.3
"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0
-nullsafety.6
"
version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0
-nullsafety.3
"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
...
...
@@ -92,56 +92,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.
0-nullsafety.4
"
version: "1.8.
1
"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0
-nullsafety.6
"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0
-nullsafety.3
"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0
-nullsafety.3
"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0
-nullsafety.3
"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.
2.19-nullsafety.6
"
version: "0.
3.0
"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0
-nullsafety.5
"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0
-nullsafety.5
"
version: "2.1.0"
sdks:
dart: ">=2.12.0
-0.0
<3.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.12.0"
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论