提交 f9643b26 authored 作者: nelson1110's avatar nelson1110

pay doc

上级 756c9dc2
# 敬请期待。。。
\ 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论