Skip to content

yangyxd/alipay_me

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alipay_me

pub package GitHub GitHub stars

Alipay plug-in. Support payment and authorized login. Support Android and iOS. Android supports local computational signatures.

Usage

To use this plugin, add alipay_me as a dependency in your pubspec.yaml file.

ROADMAP

  • 发起支付
  • 授权登录
  • 本地计算签名(仅Android)
  • 沙盒模式(仅Android)

Supported Platforms

  • Android
  • IOS

Examples

  • 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,
      );
  

License MIT

Copyright (c) 2019

About

Flutter 支付宝调用(支付、授权)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published