Last updated:
0 purchases
pockyt pay
Introduction #
pockyt_pay is a flutter plugin for Wechat Pay and Alipay.
Getting Started #
Register on the WeChat Open Platform, complete developer authentication, create an application, and obtain the appID.
For iOS, configure the universal link in the WeChat Open Platform. official document
For Android, configure the package name and signature in the WeChat Open Platform. official signature apk
Configuration #
Configure the plugin in the pubspec.yaml file.
dependencies:
pockyt_pay: ^${lastest version}
pockyt:
app_id: ${wechat app id}
url_scheme: ${alipay url scheme, unique string}
ios:
universal_link: ${wechat universal link}
copied to clipboard
Install for iOS
# step.1 Install missing dependencies
sudo gem install plist
# step.2 Enter iOS folder(example/ios/)
cd example/ios/
# step.3 Execute
pod install
copied to clipboard
How to use #
Only four steps are needed to complete the payment call.
// Create a PockytPay instance
PockytPay pockyt = PockytPay();
// Subscribe to payment result events
pockyt.subscribe();
// Request Alipay or Wechat Pay
pockyt.requestAlipay();
pockyt.requestWechatPay();
// Cancel subscription
pockyt.unsubscribe();
copied to clipboard
Please refer to the example for detailed usage instructions.
example code
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.