better_wechat_h5pay
A simple Wechat H5 payment for flutter.
Install Started
- Add this to your pubspec.yaml file:
dependencies:
better_wechat_h5pay: ^0.0.1
- Install it
$ flutter packages get
Normal usage
WechatPayWebView(controller: _payWebViewController),
Expanded(
child: Center(
child: CupertinoButton(
child: Text("支付"),
onPressed: () {
_payWebViewController.pay(url: url(), referer: referer());
},
),
),
),
String url() {
return "https://wx.tenpay.com/xxxxxx";
}
String referer() {
return Platform.isIOS ? "yourserverhost://" : "https://yourserverhost";
}
Feature
x
wechat h5 payment.