Tobias는 네이티브 Android, iOS 및 OpenHarmony AliPay SDK를 사용하여 원활한 인증 및 결제 통합을 가능하게 하는 Flutter 플러그인입니다. 개발자들이 Flutter 애플리케이션 내에서 AliPay의 안전하고 널리 채택된 결제 인프라를 활용할 수 있도록 합니다. 이 플러그인은 Flutter와 플랫폼별 AliPay 기능 사이에 브리지 역할을 하여 지원되는 장치에서 부드러운 사용자 경험을 보장합니다. 최소한의 설정으로 앱 내 결제 및 AliPay를 통한 사용자 인증을 모두 지원하며, 전자상거래 및 금융 중심 앱에 이상적입니다.
For iOS, you have to configure your Xcode project manually. See iOS Configuration.
for OpenHarmony, you have to add scheme alipays to module.json5 in your project like this:
{"module":{"querySchemes":["alipays"],}}
iOS Configuration
Breaking change in 6.0.0: tobias no longer modifies your Xcode project during pod install.
The tobias: section in pubspec.yaml (url_scheme, no_utdid, ios.ignore_security,
ios.universal_link) is obsolete and is ignored. Configure the following by hand.
Swift Package Manager
tobias supports both Swift Package Manager and CocoaPods. To use SPM, enable it once:
flutter config --enable-swift-package-manager
Nothing else is required — Flutter picks up ios/tobias/Package.swift automatically. If SPM is
not enabled, the CocoaPods podspec is used as before.
1. Info.plist
Add your own url scheme (a unique string used to resume your app, _ is not allowed):
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:
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.