Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wangyng/better_wechat_h5pay

A simple Wechat H5 payment for flutter.
https://github.com/wangyng/better_wechat_h5pay

dart flutter

Last synced: 7 days ago
JSON representation

A simple Wechat H5 payment for flutter.

Awesome Lists containing this project

README

        

# better_wechat_h5pay

A simple Wechat H5 payment for flutter.

## Install Started

1. Add this to your **pubspec.yaml** file:

```yaml
dependencies:
better_wechat_h5pay: ^0.0.1
```

2. Install it

```bash
$ flutter packages get
```

## Normal usage

```dart
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.