パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.1.1

sbp

ユーザーのデバイスにインストールされた銀行の一覧を取得できるFlutterプラグインであり、https://qr.nspk.ru/...のようなSBPによる支払いリンクを起動することもできます。

AndroidiOS
30日間ダウンロード
114
いいね数
27
Pub ポイント
140

パッケージをインストール

flutter pub add sbp

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

sbpパッケージは、ロシアの迅速決済システム(SBP)との統合を可能にするFlutterプラグインです。ユーザーのデバイスにインストールされた銀行アプリを検出し、qr.nspk.ruなどのSBP決済リンクをアプリから直接起動できるようにします。これにより、Flutterアプリ内でのスムーズかつ即時の銀行送金が実現されます。このプラグインはAndroidおよびiOSの両方のプラットフォームをサポートしており、広範な互換性を確保しています。既存のバンキングアプリを利用することで、ユーザーがカード情報を入力する必要なく、支払い処理を簡素化します。

用途

  • ECアプリにおける即時銀行送金
  • モバイルウォレットへのSBP決済の統合
  • QRコードベースの支払いを有効にする
  • デジタルサービスの購読をサポートする
  • ピアツーピア間の送金を支援する

主な機能

  • インストールされたSBP互換バンクを検出します
  • ディープリンクを介してSBP決済リンクを起動します
  • Android および iOS プラットフォームをサポートしています
  • 標準のQRベースの支払いURLを使用します
  • 支払い開始用の簡単な API を提供します

適している対象

  • ロシア市場向け決済ソリューション
  • 即時銀行送金を必要とするアプリ
  • 金融または小売アプリを開発する開発者
  • QRベースの決済を使用するプロジェクト
  • SBP対応ユーザー向けのFlutterアプリ

注意事項

  • ユーザー端末でのSBP互換銀行が必要です
  • SBPをサポートする地域(例:ロシア)に限定
  • 外部の銀行アプリの利用可能性に依存する
  • リンク検証のために追加の処理が必要になる場合があります
  • 非SBP決済システムには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

sbp

Flutter plugin, with which you can get a list of banks installed on the device user, as well as launch a link to pay for the SBP of the form https://qr.nspk.ru/.../

Adding dependencies

To use the plugin, add it to the pubspec.yaml file.

Installing

Android

Starting with android 11 in AndroidManifest.xml, you need to specify applications that our application can see

 <queries>
  <array>
    <package android:name="ru.sberbankmobile" />
    <package android:name="ru.gazprombank.android.mobilebank.app" />
    <package android:name="ru.letobank.Prometheus" />
    ...
    <package android:name="logo.com.mbanking" />
    <package android:name="com.openbank" />
  </queries>
IOS

Add URL schemes to LSApplicationQueriesSchemes in Info.plist file: This list is needed in order to make it possible to open third-party installed applications on iOS. The list of banks supported by SBP can be obtained at c2bmembers.json.

 <key>LSApplicationQueriesSchemes</key>
  <array>
    <string>bank100000000000</string>
    <string>bank100000000001</string>
    ...
    <string>bank100000000999</string>
    <string>bank100000001000</string>
  </array>

Warning! Starting with iOS 15, the maximum number of the scheme list should not exceed 50.Detailed information can be obtained from this link

Description of functions with examples

To use sbp and get current information on supported banks, SBP needs to be raised own server, which will pull up new information on banks once in a while. Warning!If you use json, don't forget to change the links to images in the file /sbp/lib/data/c2bmembers_data.dart as they take a long time to load or not to load at all (IOS).

Links to current banks from the official website of the SBP

Or you can use the current json I added to the project on 17/07/2023:

  • IOS/Android: /sbp/lib/data/c2bmembers_data.dart
Android
Sbp.openAndroidBank(String url, String packageName)

We pass the url of the form ('https://qr.nspk.ru/...' deprecated) schema://qr.nspk.ru/.... and the packageName of the application in which you want to open the SBP

IOS
Sbp.openIOSBank(String url, String schema)

We pass the url of the form https://qr.nspk.ru/.../ and the schema of the application in which you want to open the SBP

IOS/Android
List<C2bmemberModel> informations = await Sbp.getInstalledBanks(
  C2bmembersModel.fromJson(c2bmembersData),
  useAndroidLocalIcons:false,
  useAndroidLocalNames:false,
)

getInstalledBanks contains fields such as:

  • C2bmembersModel - (/sbp/lib/models/c2bmembers_model.dart)
  • useAndroidLocalIcons - if you want to use native android application icons, then put true and use the bitmap variable to display the bank icon
  • useAndroidLocalNames - if you want to use the native name of the android application, then put true and use the localName variable to display the name of the bank
  • A variable is passed c2bmembersData (json /sbp/lib/data/c2bmembers_data.dart), which is parsed and returns a C2bmembersModel.

C2bmembersModel contains fields such as:

  • version - json version
  • c2bmembersModel - List C2bmemberModel installed applications
    • C2bmemberModel contains fields such as:
      • bankName - bank name
      • logoURL - link to picture
      • schema - application schema
      • packageName - application packageName
      • icon - icon app from assets
      • bitmap - bitmap app on device(only for Android)
      • localName - local name app on device(only for Android)
openBank(String url, C2bmemberModel c2bmemberModel)

We pass the url of the form https://qr.nspk.ru/.../ and the c2bmemberModel of the application in which you want to open the SBP

If you want to use local bank icons from assets , you need to include them in the project (see file /sbp/lib/data/c2bmembers_data.dart field icon):

flutter:
  assets:
    - packages/sbp/assets/sbp.png
    - packages/sbp/assets/...
    etc

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。