union_pay 1.0.1
union_pay: ^1.0.1 copied to clipboard

A Flutter plugin for allowing developers to pay with native Android&iOS UnionPay SDKs.

Flutter UnionPay #

银联支付SDK Flutter版插件,支持iOS,Android平台。

开始 #

在使用前强烈阅读银联官方接入指南。 例如,在iOS上你还要设置URL Scheme。

android #

# 混淆目前暂时关闭了。

iOS #

在工程info.plist 设置中添加一个 URL Types,否则无法返回你的app.

info.plist文件中添加白名单:

<key>LSApplicationQueriesSchemes</key>
<array>
   	<string>uppaysdk</string>
   	<string>uppaywallet</string>
   	<string>uppayx1</string>
   	<string>uppayx2</string>
   	<string>uppayx3</string>
</array>

获取云闪付SDK版本号(iOS暂不支持) #

  var version = await UnionPay.uPayVersion();

检查云闪付App是否安装 #

  var result = await UnionPay.isInstalled();

支付 #

只需设置支付环境和交易流水号即可。

  var result = await UnionPay.pay(
                mode: PaymentEnv.DEVELOPMENT,
                tn: "",
                scheme: "UnionPayTest",
              );

mode分为测试环境和生产环境,scheme只对iOS有效

Flutter #

支持Flutter 空安全

example 示例

2
likes
95
pub points
13%
popularity

A Flutter plugin for allowing developers to pay with native Android&iOS UnionPay SDKs.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on union_pay