提交 5d2f6c3e authored 作者: JarvanMo's avatar JarvanMo

Merge branch 'master' of github.com:JarvanMo/fluwx

......@@ -2,10 +2,10 @@
微信的回调也要根据平台的不同进行差异化处理。
### Android
除了支付以外的回调,你需要在你的```WXEntryActivity```中添加如下代码:
需要在`WXEntryActivity``WXPayEntryActivity`中添加如下代码:
```kotlin
override fun onResp(resp: BaseResp) {
FluwxResponseHandler.handleResponse(resp)
}
```
你也可以直接继承```FluwxWXEntryActivity```
\ No newline at end of file
你也可以直接继承```FluwxWXEntryActivity```
# 敬请期待。。。
\ No newline at end of file
# 微信支付
## Android
```dart
Fluwx fluwx = new Fluwx();
fluwx.pay(WeChatPayModel(
appId: 'wxd930ea5d5a258f4f',
partnerId: '1900000109',
prepayId: '1101000000140415649af9fc314aa427',
packageValue: 'Sign=WXPay',
nonceStr: '1101000000140429eb40476f8896f4c9',
timeStamp: '1398746574',
sign: '7FFECB600D7157C5AA49810D2D8F28BC2811827B',
signType: '选填',
extData: '选填'
));
```
\ No newline at end of file
......@@ -36,5 +36,6 @@
</intent-filter>
</activity>
<activity android:name=".wxapi.WXEntryActivity" />
<activity android:name=".wxapi.WXPayEntryActivity" />
</application>
</manifest>
package com.jarvan.fluwxexample.wxapi;
import android.app.Activity;
import com.jarvan.fluwx.handler.FluwxResponseHandler;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler {
@Override
public void onReq(BaseReq baseReq) {
}
@Override
public void onResp(BaseResp baseResp) {
FluwxResponseHandler.INSTANCE.handleResponse(baseResp);
}
}
import 'package:flutter/foundation.dart';
class WeChatPayModel{
final appId;
final partnerId;
......@@ -10,8 +12,9 @@ class WeChatPayModel{
final extData;
WeChatPayModel(this.appId, this.partnerId, this.prepayId, this.packageValue,
this.nonceStr, this.timeStamp, this.sign,{this.signType, this.extData});
WeChatPayModel({@required this.appId,@required this.partnerId,@required this.prepayId,
@required this.packageValue,@required this.nonceStr,@required this.timeStamp,@required this.sign,
this.signType, this.extData});
Map toMap() {
return {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论