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

GitHub 저장소invoiceninja/flutter-package

flutter-패키지

Flutter 앱에서 PDF 송장 생성 및 결제 수락

flutter-패키지 프로젝트 이미지
스타
40
포크
11
최근 푸시(UTC)
2023. 3. 31.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

Invoice Ninja

Create PDF invoices and accept payments in a Flutter app

Sample

YouTube Video

YouTube Video

Features

  • Accept online payment in mobile, web and desktop Flutter apps
  • Supports many payment gateways including Stripe, PayPal and more
  • Create professional PDF invoices
  • Includes a self-service client portal
  • Many more features...

Overview

The package provides two main classes:

  • InvoiceNinja: Supports the public 'Storefront' routes which allow reading the list of products and creating/finding clients and invoices. Using this class works with restricted access to the account.
  • InvoiceNinjaAdmin: Supports the REST Admin API which uses token based security. Using this class requires an API token to access the account.

Storefront API

Configure
InvoiceNinja.configure(
  'KEY', // Set your company key or use 'KEY' to test
  url: 'https://demo.invoiceninja.com', // Set your selfhost app URL
  debugEnabled: true,
);
Load the product list
final products = await InvoiceNinja.products.load();
Find the product by key
final product = await InvoiceNinja.products.findByKey('product_key');
Create/persist the client
var client = Client.forContact(email: 'test@example.com');
client = await InvoiceNinja.clients.save(client);
Create/persist the invoice
var invoice = Invoice.forClient(client, products: [product]);
invoice = await InvoiceNinja.invoices.save(invoice);
Display the PDF invoice
launch(
  'https://docs.google.com/gview?embedded=true&url=${invoice.pdfUrl}',
  forceWebView: true,
);
Accept the payment
var invoiceKey = invoice.key;
launch(invoice.url);

// ...

final invoice = await InvoiceNinja.invoices.findByKey(invoiceKey);
if (invoice.isPaid) {
  // ...
}

You can use the WidgetsBindingObserver interface to run code when the app is resumed.

Consider giving issue #57536 a thumbs up to make this better in the future.

Admin API

Configure
InvoiceNinjaAdmin.configure(
  'TOKEN', // Set your API token or use 'TOKEN' to test
  url: 'https://demo.invoiceninja.com', // Set your selfhost app URL
  debugEnabled: true,
);
Find a client by email
final client = await InvoiceNinjaAdmin.clients.findByEmail(email);
Load all invoices
final payments = await InvoiceNinjaAdmin.payments.load();
Load the payments list
final payments = await InvoiceNinjaAdmin.payments.load();
Find a payment by id
final payment = await InvoiceNinjaAdmin.payments.findById(id);
Create/persist an invoice and auto-bill it
var invoice = Invoice.forClient(client, products: [product]);
invoice = await InvoiceNinjaAdmin.invoices.save(invoice, action: InvoiceAction.autoBill);
Invoice Ninja GitHub avatar
GitHub 작성자

Invoice Ninja ↗

An open-code invoicing app built with Laravel and Flutter

언어DartC++CMakeHTMLCSwiftKotlinObjective-C

분류

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 8 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗