Buscar pacotes, repositórios e categorias de apps

Detalhes do pacotev1.2.3

stripe_native

Crie tokens de Stripe cobráveis usando o Apple Pay e Google Pay. Exiba as planilhas nativas do Apple Pay e Google Pay, depois colete tokens de fonte únicos.

Downloads em 30 dias
30
Curtidas
26
Pontos Pub
40

Instalar pacote

flutter pub add stripe_native

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

O pacote stripe_native permite que aplicativos Flutter criem tokens do Stripe pagáveis usando o Apple Pay e o Google Pay. Ele oferece integração com formulários de pagamento nativos, permitindo que os usuários autorizem pagamentos de forma segura por meio dos sistemas de pagamento integrados ao dispositivo. Após a aprovação do usuário, o pacote coleta tokens de fonte únicos para uso em transações do Stripe. Projetado para experiências de checkout sem interrupções, ele utiliza APIs específicas da plataforma sem exigir implementação de interface personalizada. O pacote é ideal para aplicativos que precisam de fluxos de pagamento nativos e seguros com configuração mínima.

Casos de uso

  • Pagamentos únicos por meio do Apple Pay
  • Pagamentos únicos por meio do Google Pay
  • Geração segura de token para Stripe
  • Integração de checkout nativo
  • Aplicativos móveis de comércio eletrônico
  • Compras no aplicativo

Principais recursos

  • Integração nativa do Apple Pay
  • Integração nativa do Google Pay
  • Coleta de token de origem única
  • Personalização mínima da interface do usuário
  • Planilhas de pagamento específicas da plataforma
  • Processamento de pagamento seguro

Indicado para

  • Aplicativos móveis de comércio eletrônico
  • Serviços baseados em assinatura
  • Aplicativos que exigem pagamentos seguros
  • Desenvolvedores usando o Stripe
  • Projetos com suporte ao Apple/Google Pay

Considerações

  • Requer configuração da conta Stripe
  • Limitado a iOS e Android
  • É necessário um configuração adequada do comerciante
  • Depende da disponibilidade de pagamento do dispositivo
  • Não adequado para pagamentos recorrentes
  • Sem suporte para plataforma web

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

Stripe Native

Create chargeable stripe tokens using Apple and Google Pay.

This plugin will give you easy access to the Apple and Google Pay payment sheets. And provide one-time source tokens that are used to create a Stripe Charge.

Apple Pay

Setup

Both (Required)

To begin one will need a Stripe project, from there collect a publishable key.

iOS (Required)

On the Apple Developer portal, one will need to create a merchant identifier. Then connect that identifier to the Stripe project.

From the Stripe dashboard, create a signing certificate to share with Apple, then upload the signed certificate to Stripe.

Merchant Identifier

Lastly, open the apps' iOS module. Add the newly created identifier to the project's signing capabilities.

Signing Capablities

Android (Optional)

On the Google Play console, add the merchant identifier to the app capabilites. This makes the merchant known to Google Pay. With it, users will not see a warning saying this app is an unidentified merchant.

Functions

Set Publishable Key

Prior to calling native pay, set the publishable key.

StripeNative.setPublishableKey("pk_test_yZuUz6Sqm83H4lA7SrlAvYCh003MvJiJlR");
Set Merchant Identifier

Prior to calling native pay, set the merchant identifier.

StripeNative.setMerchantIdentifier("merchant.rbii.stripe-example");
Set Currency Key

In order to change the currency, pass in an ISO currency code prior to opening a payment sheet. On iOS it also requires passing in a country code.

StripeNative.setCurrencyKey("EUR");
// Not required on Android
StripeNative.setCountryKey("FR");
Native-Pay

There are two ways to create a payment sheet. With a list of items and prices, or with some subtotal, tax and tip.

Both methods require a merchant name to display at the bottom of the sheet.

// subtotal, tax, tip, merchant name
var order = Order(5.50, 1.0, 2.0, "Some Store");
var token = await StripeNative.useNativePay(order);
const itemPrices = <String, double>{"Nice Hat": 5.00, "Used Hat" : 1.50};
var receipt = Receipt(itemPrices, "Hat Store");
var token = await StripeNative.useReceiptNativePay(receipt);
Confirm Payment (iOS)

On iOS the payment sheet spins and ends with a check or X depending on the result passed in. During the spinning, query an endpoint for a charge using the token. This function does not affect Android.

// call charge endpoint w/ token
const wasCharged = await AppAPI.charge(token, amount);
// then show success or failure
StripeNative.confirmPayment(wasCharged);

Categorias

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.