eft_payplugin 0.1.1

Flutter Android iOS

A new flutter plugin project.

eft_payplugin #

A new flutter plugin project.

Getting Started #

微信开放平台申请账号,开通支付功能,获取APPID

Android #

微信开放平台配置包名和微信签名工具获取的签名

IOS #

微信开放平台配置bundle id和universalLink Info.plist配置

AppDelegate.m增加回调 #import <eft_payplugin/EftPaypluginPlugin.h>

  • (BOOL)application:(UIApplication *)application             openURL:(NSURL *)url   sourceApplication:(NSString *)sourceApplication          annotation:(id)annotation {   NSLog(@"openURL=%@",url);   [[EftPaypluginPlugin getInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];   return YES; }

// NOTE: 9.0以后使用新API接口

  • (BOOL)application:(UIApplication *)app openURL:(NSURL )url options:(NSDictionary<NSString, id> *)options {   NSLog(@"openURL=%@",url);   [[EftPaypluginPlugin getInstance] application:app openURL:url options:options];   return YES; }

Flutter使用 #

引用支付模块功能 #

import 'package:eft_payplugin/eft_payplugin.dart';

4.EftPayplugin接口说明 在使用调用支付功能前先进行微信注册和获取权限

微信注册 #

static Future

获取设备ID权限接口 #

若不获取android6.0后首次调起支付宝支付会报权限异常 Android6.0及以上根据是否授权返回,IOS都返回成功 static Future

生成商户订单号 #

用于查询跟踪订单的支付状态,长度20位,同一商户,商户订单号必须唯一,可自行生成 static String getOutTradeNo()

支付接口 #

static Future

交易查询 #

static Future

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.