eft_payplugin 0.1.1

  • Readme
  • Changelog
  • Installing
  • 44

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.

0.1.1 #

IOS修复

0.1.0 #

完善接入方式说明

0.0.1 #

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  eft_payplugin: ^0.1.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:eft_payplugin/eft_payplugin.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
44
Learn more about scoring.

We analyzed this package on Jul 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:eft_payplugin/eft_payplugin.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:eft_payplugin/eft_payplugin.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:eft_payplugin/eft_payplugin.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:eft_payplugin/eft_payplugin.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [eft_payplugin] that is in a package requiring null.

Health suggestions

Fix lib/eft_payplugin.dart. (-0.50 points)

Analysis of lib/eft_payplugin.dart reported 1 hint:

line 37 col 12: Name non-constant identifiers using lowerCamelCase.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and eft_payplugin.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test