Alipay plug-in. Support payment and authorized login. Support Android and iOS. Android supports local computational signatures.
To use this plugin, add alipay_me
as a dependency in your pubspec.yaml
file.
- 发起支付
- 授权登录
- 本地计算签名(仅Android)
- 沙盒模式(仅Android)
Supported Platforms
- Android
- IOS
- Examples App - Demonstrates how to use the alipay_me plugin.
阿里蚂蚁金服开放平台: https://openhome.alipay.com/platform/appManage.htm
支付宝登录文档: https://docs.open.alipay.com/218/105326/
支付宝支付文档: https://docs.open.alipay.com/204/105295/
import 'package:alipay_me/alipay_me.dart';
// 初始化
initAlipay() async {
final String tid = "tid_${DateTime.now().millisecondsSinceEpoch}";
await AlipayMe.init(
appId: "2019010362782013",
pid: "2088012716890635",
rsa2Private: RSAPrivate,
targetId: tid
);
}
// 发起支付
var o = await AlipayMe.pay(apyInfo,
urlScheme: "alisdkdemo", // 这里的URL Schemes中输入的alisdkdemo,为测试demo,实际商户的app中要填写独立的scheme
isSandbox: _isSandbox,
);
//授权申请
await AlipayMe.auth(
urlScheme: "alisdkdemo", // 这里的URL Schemes中输入的alisdkdemo,为测试demo,实际商户的app中要填写独立的scheme
isSandbox: _isSandbox,
authInfo: data,
);
Copyright (c) 2019