Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/wangyng/better_wechat_h5pay
- Owner: WangYng
- License: bsd-3-clause
- Created: 2021-06-23T03:31:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-23T03:36:27.000Z (over 3 years ago)
- Last Synced: 2024-12-20T19:32:52.194Z (about 1 month ago)
- Topics: dart, flutter
- Language: Dart
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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.