搜尋套件、儲存庫與 APP 分類

套件詳情v0.0.1+1

paymob_payment

使用 Paymob 在您的 Flutter 應用中輕鬆透過線上信用卡接受付款。

AndroidiOSmacOS
近 30 天下載
3
喜歡數
39
Pub 分數
150

安裝套件

flutter pub add paymob_payment

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Paymob Payment 是一個 Flutter 套件,可實現行動應用程式中線上信用卡支付的無縫整合。它簡化了透過 Paymob 安全支付網關接收付款的流程,支援 Android、iOS 和 macOS 平台。開發者可輕鬆使用提供的 SDK 實現支付功能,設定簡單。該套件處理權杖化與安全交易處理,確保符合產業標準。適用於電商應用、訂閱服務,以及任何需要應用內支付功能的應用。

適用情境

  • 電子商務應用
  • 訂閱計費
  • 應用內購買
  • 數位服務付款
  • 線上票務

主要特色

  • 安全的信用卡支付
  • 跨平台支援
  • 輕鬆整合
  • 已標記的交易
  • 即時支付狀態

適合對象

  • 移動電子商務應用
  • 基於訂閱的服務
  • 數位產品賣家
  • 支付整合平台
  • 使用 Paymob 的開發者

使用建議

  • 需要 Paymob 帳戶設定
  • 需要正確的 API 金鑰設定
  • 僅限Paymob支援的地區
  • 依賴互聯網連接
  • 可能需要額外的後端驗證

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

paymob_payment

Easily accept payments through Online Cards in your Flutter app with Paymob.

Example

:rocket: Installation

Add this to dependencies in your app's pubspec.yaml

paymob_payment : latest_version

:hammer: Initialization

PaymobPayment.instance.initialize(
  apiKey: "", // from dashboard Select Settings -> Account Info -> API Key 
  integrationID: 123456, // from dashboard Select Developers -> Payment Integrations -> Online Card ID 
  iFrameID: 123456, // from paymob Select Developers -> iframes 
);

:pushpin: Note :

You can use this singleton (instance) or Create your own
if you want to create different iFrames or integrations

final PaymobPayment paymobPayment = PaymobPayment();
  paymobPayment.initialize(
  apiKey: "", 
  integrationID: 123456, 
  iFrameID: 123456, 
);

:bookmark: Usage

final PaymobResponse? response = await PaymobPayment.instance.pay(
  context: context,
  currency: "EGP",
  amountInCents: "20000", // 200 EGP
  onPayment: (response) => setState(() => this.response = response), // Optional
)

:incoming_envelope: PaymobResponse

Variable Type Description
success bool Indicates if the transaction was successful or not
transactionID String? The ID of the transaction
responseCode String? The response code for the transaction
message String? A brief message describing the transaction

:test_tube: Testing Cards

:white_check_mark: Successful payment
Variable Description
Card Number 5123456789012346
Expiry Month 12
Expiry Year 30
CVV 123
:negative_squared_cross_mark: Declined payment

Change cvv to 111 or expiry year to 20

:pushpin: Note :

May be you have to contact paymob support to activate your test card

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。