패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.3.0

cloudpayments

Android 및 iOS 애플리케이션에서 Cloudpaymanets를 통합하기 위한 플러터 플러그인입니다.

AndroidiOS
30일 다운로드
58
좋아요
27
Pub 점수
140

패키지 설치

flutter pub add cloudpayments

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

안드로이드 및 iOS 애플리케이션에 CloudPayments를 원활하게 통합할 수 있는 플러터 플러그인입니다. 카드 처리 및 거래 관리를 포함한 결제 처리를 위한 간단한 인터페이스를 제공합니다. CloudPayments API와 함께 작동하도록 설계되어 안전한 결제 흐름과 실시간 거래 상태 업데이트를 지원합니다. 이 플러그인은 두 주요 모바일 플랫폼과 호환되며, 플러터 앱에서 결제 기능을 구현하는 것을 간소화합니다.

사용 사례

  • 앱 내 구매
  • 전자상거래 체크아웃
  • 구독 결제
  • 결제 게이트웨이 통합
  • 모바일 지갑 거래

주요 기능

  • 보안 카드 처리
  • 크로스 플랫폼 지원
  • 실시간 거래 상태
  • Flutter로 간편한 설정
  • CloudPayments와의 API 호환성

적합한 대상

  • 모바일 전자상거래 앱
  • 디지털 제품 판매자
  • 구독 기반 서비스
  • 안전한 결제가 필요한 앱
  • 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.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.