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

flutter_stripe_payment 표지
패키지 상세v0.0.18

flutter_stripe_payment

강력한 SCA 3DS 준수를 갖춘 Payment Intents를 사용하여 Flutter 애플리케이션에 Stripe를 추가하여 카드 결제를 수락하세요.

AndroidiOS
30일 다운로드
85
좋아요
57
Pub 점수
125

패키지 설치

flutter pub add flutter_stripe_payment

패키지 개요

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

flutter_stripe_payment은 모바일 애플리케이션에 Stripe 결제 처리를 원활하게 통합할 수 있도록 해주는 Flutter 패키지입니다. Payment Intents를 통해 카드 결제를 지원하며, 강력한 고객 인증(SCA) 및 3D 세이프(3DS) 요구 사항을 준수합니다. Android와 iOS용으로 설계되었으며, 토큰화 및 실시간 결제 확인을 내장된 지원 기능을 통해 안전한 거래 처리를 간소화합니다. 개발자는 민감한 카드 데이터를 직접 관리하지 않고도 견고하고 PCI 준수 결제 흐름을 구현할 수 있습니다. SDK는 복잡한 인증 프로세스를 처리하여 체크아웃 성공률을 높이며, 높은 보안 기준을 유지합니다.

사용 사례

  • 앱 내 구매
  • 전자상거래 체크아웃
  • 구독 결제
  • 디지털 서비스 결제
  • 온라인 기부

주요 기능

  • SCA 및 3DS 준수
  • 결제 의도 지원
  • 보안 카드 토큰화
  • 실시간 결제 확인
  • 크로스 플랫폼(안드로이드 및 iOS)

적합한 대상

  • 모바일 전자상거래 앱
  • 구독 기반 서비스
  • 안전한 결제가 필요한 앱
  • Stripe를 사용하는 개발자
  • SCA 준수를 필요로 하는 프로젝트

고려 사항

  • Stripe 계정 설정이 필요합니다
  • 결제 의도 생성을 위한 백엔드 필요
  • 스트라이프의 결제 수단에 한정됨
  • 네트워크 연결에 의존
  • 테스트 환경을 위해 추가 구성이 필요할 수 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_stripe_payment

Add Stripe to your Flutter Application to Accept Card Payments using Payment Intents and the Latest SCA Compliance 3DS Requirements

Getting Started

Strong Customer Authentication (SCA), a new rule coming into effect on September 14, 2019, as part of PSD2 regulation in Europe, will require changes to how your European customers authenticate online payments. Card payments will require a different user experience, namely 3D Secure, in order to meet SCA requirements. Transactions that don’t follow the new authentication guidelines may be declined by your customers’ banks.

The Payment Intents API is a new way to build dynamic payment flows. It tracks the lifecycle of a customer checkout flow and triggers additional authentication steps when required by regulatory mandates, custom Radar fraud rules, or redirect-based payment methods.

Initialize

final _stripePayment = FlutterStripePayment();
_stripePayment.onCancel = (){
  print("User Cancelled the Payment Method Form");
};

Setup Stripe Environment


_stripePayment.setStripeSettings(
        appConfig.values.stripePublishableKey,
        appConfig.values.applePayMerchantId);

Show Payment Form

var paymentResponse = await _stripePayment.addPaymentMethod();
if(paymentResponse.status == PaymentResponseStatus.succeeded)
  {
    print(paymentResponse.paymentMethodId);
  }

Create Payment Intent On Server

var intent = PaymentIntent();
    intent.amount = widget.order.cart.total;
    intent.isManual = true;
    intent.isConfirmed = false;
    intent.paymentMethodId = paymentResponse.paymentMethodId;
    intent.currency = "usd";
    intent.isOnSession = true;
    intent.isSuccessful = false;
    intent.statementDescriptor = "Dorm Mom, Inc";
    var response = await widget.clientDataStore.createPaymentIntent(intent);

Confirm Payment Intent to Kick Off 3D Authentication

var intentResponse = await _stripePayment.confirmPaymentIntent(
          response.clientSecret, paymentResponse.paymentMethodId, widget.order.cart.total);

      if (intentResponse.status == PaymentResponseStatus.succeeded) {
        widget.order.paymentIntentId = intentResponse.paymentIntentId;
        widget.order.paymentMethodId = paymentResponse.paymentMethodId;
        _submitOrder();
      } else if (intentResponse.status == PaymentResponseStatus.failed) {
        setState(() {
          hideBusy();
        });
        globals.Utility.showAlertPopup(
            context, "Error Occurred", intentResponse.errorMessage);
      } else {
        setState(() {
          hideBusy();
        });
      }

Setup Payment Intent For Future Payments

var intentResponse = await _stripePayment.setupPaymentIntent(
        response.clientSecret, paymentResponse.paymentMethodId);

    if (intentResponse.status == PaymentResponseStatus.succeeded) {
      await _addCardToAccount(paymentResponse.paymentMethodId);
    } else if (intentResponse.status == PaymentResponseStatus.failed) {
      setState(() {
        hideBusy();
      });
      globals.Utility.showAlertPopup(
          context, "Error Occurred", intentResponse.errorMessage);
    } else {
      setState(() {
        hideBusy();
      });
    }

Screenshots

iOS View Android View
iOS View Android View

To Do

  • [DONE]Android Implementation
  • STPaymentCardTextField Inline Embedding

카테고리

소스 저장소

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

아직 데이터가 없습니다.