• Stars
    star
    678
  • Rank 66,609 (Top 2 %)
  • Language
    Objective-C
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

AliPay For Flutter.支付宝Flutter插件

logo Build status

中文移步这里

Join QQ Group now: 1003811176

QQGroup

What's Tobias

Tobias is a flutter plugin for AliPaySDK.

Getting Started

I highly recommend that you read the official documents before using tobias.

  1. You have to config url_scheme in pubspec.yaml. Url scheme is a unique string to resume you app on iOS but please note that _ is invalid.

Payment

It's simple,pass Tobias your order info from server :

import 'package:tobias/tobias.dart' ;
Tobias tobias = Tobias();
tobias.pay(yourOrder);

The result is map contains results from AliPay.The result also contains an external filed named platform which means the result is from iOS or android. Result sample:

{
result: partner="2088411752388544"&seller_id="[email protected]"&out_trade_no="180926084213001"&subject="test pay"&total_fee="0.01"&notify_url="http://127.0.0.1/alipay001"&service="mobile.securitypay.pay"&payment_type="1"&_input_charset="utf-8"&it_b_pay="30m"&return_url="m.alipay.com"&success="true"&sign_type="RSA"&sign="nCZ8MDhsNvYNAbrLZJZ2VUy6vydgAp+JCq1aQo6ORDYtI9zwtnja3qNGQNiDJCuktoIj7fSTM487XhjPDqnOreZjIA1GJpxu9D1I3nMXIn1M7DfZ0noDwXcYZ438/jbYac7g8mhpwdKGweLCAni9mO3Y6q3iBFkox8i9PcsGxJY=",
resultStatus: 9000,
 memo: ,
 platform:iOS
}

NOTE:Tobias use pay_V2.

If you're facing conflicts with utdid on iOS, you can set no_utdid: true in pubspec.yaml

Auth

import 'package:tobias/tobias.dart' ;
Tobias tobias = Tobias();
tobias.auth("your auth str);

Check AliPay Installation

Tobias tobias = Tobias();
var result = await tobias.isAliPayInstalled;

You can also call tobias.version which returns a map contains version and platform.

Upgrade to 1.0.0

There's no need to override AppDelegate since tobais 1.0.0. If you have done that before, please remove the following code in your AppDelegate:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
  return [TobiasPlugin handleOpenURL:url];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options
{
  return [TobiasPlugin handleOpenURL:url];
}

If you have to override these two functions, make sure you have called the super:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    
  return [super application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options
{
    
  return [super application:application openURL:url options:options];
}

Donate

Buy me a cup of coffee。

Subscribe Us On WeChat

subscribe

LICENSE

Copyright 2018 OpenFlutter Project

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements.  See the NOTICE file distributed with this work for
additional information regarding copyright ownership.  The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.  You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
License for the specific language governing permissions and limitations under
the License.

More Repositories

1

Flutter-Notebook

FlutterDemo合集,今天你fu了吗
Dart
7,138
star
2

flutter_screenutil

Flutter screen adaptation, font adaptation, get screen information
Dart
3,883
star
3

fluwx

Flutter版微信SDK.WeChat SDK for flutter.
Dart
3,059
star
4

PullToRefresh

Flutter相关的项目QQ:277155832 Email:[email protected]
Dart
472
star
5

k_chart

Maybe it is the best k chart in Flutter.
Dart
459
star
6

flutter_oktoast

a pure flutter toast library
Dart
457
star
7

Pangolin

🐾 Flutter 广告SDK-字节跳动-穿山甲 集成
Java
332
star
8

OpenFlutter

Love flutter love life.QQ群:892398530
301
star
9

flutter_listview_loadmore

flutter loadmore demos
Dart
242
star
10

flutter_share_me

Flutter Plugin for sharing contents to social media. You can use it share to Facebook , WhatsApp , Twitter And System Share UI. Support Url and Text.
Swift
151
star
11

nautilus

阿里百川电商Flutter插件。
Objective-C
130
star
12

mini_calendar

Date component developed with Flutter, plans to support display, swipe left and right, add date mark, radio, display week, etc.
Dart
114
star
13

mmkv_flutter

get or set persistent storage value based on MMKV framework.
Dart
101
star
14

flutter_im_demo

📞 Flutter 使用 MQTT实现IM功能
Dart
82
star
15

flutter_gesture_password

flutter_gesture_password
Dart
78
star
16

rammus

Flutter Plugin for AliCloud Push.阿里云推送插件
Kotlin
77
star
17

neeko

Flutter video player widget based on video_player
Dart
70
star
18

FlutterInAction

Flutter In Action.Flutter实践。
46
star
19

flutter_ok_image

a flutter image widget to load image.
Dart
40
star
20

flutter_database_demo

🛠 Flutter 本地数据库存储 + 状态管理
Dart
35
star
21

sona

@Deprecated Not maintained. Developers who need Getui push please visit official plugins
Objective-C
35
star
22

tencent_cos

Flutter plugin for cos
Java
23
star
23

flutter_paging

Paging like android jetpack
Dart
11
star
24

flutter_navigation_bar

解决官方例子会不停销毁重建的问题
Dart
10
star
25

kart

A kotlin-style extension collection for dart.
Dart
7
star
26

flutter_ali_face_verify

Flutter plugin for Ali face verify
Dart
1
star