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

パッケージ詳細v0.3.0

cloudpayments

AndroidおよびiOSアプリケーションにCloudpaymanetsを統合するためのFlutterプラグイン。

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

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

flutter pub add cloudpayments

パッケージ概要

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

AndroidおよびiOSアプリケーションへのCloudPaymentsのシームレスな統合を可能にするFlutterプラグインです。カード処理や取引管理を含む支払い処理のための直感的なインターフェースを提供します。CloudPayments APIと連携するように設計されており、セキュアな支払いフローとリアルタイムでの取引ステータスの更新をサポートしています。このプラグインは2つの主要なモバイルプラットフォームに対応しており、Flutterアプリにおける支払い機能の実装を簡素化します。

用途

  • アプリ内購入
  • 電子商取引チェックアウト
  • サブスクリプション課金
  • 決済ゲートウェイの統合
  • モバイルウォレット取引

主な機能

  • セキュアなカード処理
  • クロスプラットフォーム対応
  • リアルタイム取引状態
  • Flutter による簡単なセットアップ
  • CloudPayments との API の互換性

適している対象

  • モバイルECアプリ
  • デジタル製品の販売者
  • サブスクリプションベースのサービス
  • セキュアな決済を必要とするアプリ
  • Android および iOS で Flutter を使用する開発者

注意事項

  • CloudPaymentsアカウントが必要です
  • 適切なSSL構成が必要です
  • 追加のバックエンド検証が必要になる場合があります
  • 外部APIの安定性に依存しています
  • 地域の決済規制への準拠

元の README

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

cloudpayments

A Flutter plugin for integrating Cloudpaymanets in Android and iOS applications.

Disclaimer: It is not an official plugin. It uses SDK-Android on Android and SDK-IOS on iOS. Also this plugin doesn't send any requests to Cloudpayments API. In order to make purchases you have to implment some logic on your server.

Steps to make purchase:

  • In the application, you need to obtain card data: number, expiration date, holder's name, and CVV;
  • Create a card data cryptogram using this plugin;
  • Send a cryptogram and all data for payment from a mobile device to your server;
  • Make a payment via API call with your server.

See the official documentation:

Supports
  • [X] Check the validity of the card's parameters.
  • [X] Generate card cryptogram packet.
  • [X] Show 3ds dialog.
  • [X] Google Pay payments.
  • [X] Apple Pay payments.

Getting Started

Initializing for Android

If you want to show 3ds dialog on Android, make MainActivity implements FlutterFragmentActivity instead of FlutterActivity

android/app/src/main/.../MainActivity.kt:

import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() {}

Usage

  • Check card number validity.
bool isValid = await Cloudpayments.isValidNumber(cardNumber);
  • Check card expire date.
bool isValid = await Cloudpayments.isValidExpireDate(cardNumber); // MM/yy
  • Generate card cryptogram packet. You need to get your publicId from your personal account.
final cryptogram = await Cloudpayments.cardCryptogram(cardNumber, expireDate, cvcCode, publicId);
  • Showing 3DS form and get results of 3DS auth.
final result = await Cloudpayments.show3ds(acsUrl, transactionId, paReq);

Apple Pay

  • Create instance of CloudpaymentsApplePay.
final applePay = CloudpaymentsApplePay();
  • Check whether Apple Pay is available on this device and can process payment requests.
final isApplePayAvailable = await applePay.isApplePayAvailable();
  • Request payment.
final paymentToken = await applePay.requestApplePayPayment(
    merchantId: 'merchant.com.YOURDOMAIN',
    currencyCode: 'RUB',
    countryCode: 'RU',
    products: [
        {"name": "Red apple", "price": "170"},
        {"name": "Mango", "price": "250.50"},
        {"name": "Delivery", "price": "100"},
        {"name": "Discount", "price": "-89.90"},
        {"name": "Total", "price": "430.60"},
    ],
);

Now you can use paymentToken for payment by a cryptogram.

Google Pay

  • Create instance of CloudpaymentsGooglePay. Pass Google Pay Evironemnt (test or production) into constructor.
 final googlePay = CloudpaymentsGooglePay(GooglePayEnvironment.production);
  • Check whether Google Pay is available on this device and can process payment requests.
final isGooglePayAvailable = await googlePay.isGooglePayAvailable();
  • Request payment.
 final result = await googlePay.requestGooglePayPayment(
    price: '430.6',
    currencyCode: 'RUB',
    countryCode: 'RU',
    merchantName: 'Example Merchant',
    publicId: 'test_api_00000000000000000000002',
);

if (result != null) {
    if (result.isSuccess) {
      final paymentToken = result.token;
    }
}

Now you can use paymentToken for payment by a cryptogram.

カテゴリー

ソースリポジトリ

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

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