pockyt_pay 0.6.2 copy "pockyt_pay: ^0.6.2" to clipboard
pockyt_pay: ^0.6.2 copied to clipboard

A flutter payment plugin that supports both Wechat Pay and Alipay

Introduction #

pub package
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}
  • 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

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();
  • Please refer to the example for detailed usage instructions. example code
1
likes
150
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter payment plugin that supports both Wechat Pay and Alipay

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on pockyt_pay