FLUTTER ECOSYSTEM

sanjidbillah/aamarpay

aamarPay 공식 플러터 패키지입니다. aamarPay는 방글라데시를 위한 온라인 결제 게이트웨이 서비스입니다. 기업을 위한 최고의 온라인 결제 경험 제공에 헌신하고 있습니다. 가장 낮은 수수료와 빠른 체크아웃으로 온라인 결제 수령 경험을 향상시킵니다.

aamarpay 프로젝트 이미지
Stars
8
Forks
8
최근 푸시(UTC)
2025. 10. 12.
프로젝트 상태
활성
Masum Billah Sanjid GitHub avatar
GITHUB User

Masum Billah Sanjid ↗

Panna GroupDhaka
언어DartSwiftKotlinObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개
  • flutter{"sdk":"flutter"}
  • webview_flutter^4.13.0
  • dio^5.9.0
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

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

README 펼치기 / 접기

aamarpay

aamarPay is an online payment gateway service for Bangladesh. Committed to provide best payment experience online for business. Lowest fee and fast checkout will give you good experience of receiving payment online.

aamarpay

Requirements

  • Android: minSdkVersion 19

How to use:

In the dependencies: section of your pubspec.yaml, add the following line:

dependencies:
     aamarpay: ^1.0.15

install packages from the command line:

$ flutter pub get

Importance notes

  • Read the comments in the example code
  • The transactionID must be unique for every payment
  • There is a test signature key. But when you go to the production you must use your own signature key
  • It is better to practice with the example code first

Here is the example code:

import 'package:flutter/material.dart';
import 'package:aamarpay/aamarpay.dart';

void main() {
  runApp(MaterialApp(
    home: MyPay(),
  ));
}

class MyPay extends StatefulWidget {
  @override
  _MyPayState createState() => _MyPayState();
}

class _MyPayState extends State<MyPay> {
  bool isLoading = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Aamarpay(
          // This will return a payment url based on failUrl,cancelUrl,successUrl
          returnUrl: (String url) {
            print(url);
          },
          // This will return the payment loading status
          isLoading: (bool loading) {
            setState(() {
              isLoading = loading;
            });
          },
          // This will return the payment event with a message
          status: (EventState event, String message) {
            if (event == EventState.error) {
              setState(() {
                isLoading = false;
              });
            }
          },
          // When you use your own url, you must have the keywords:cancel,confirm,fail otherwise the callback function will not work properly
          cancelUrl: "example.com/payment/cancel",
          successUrl: "example.com/payment/confirm",
          failUrl: "example.com/payment/fail",
          customerEmail: "masumbillahsanjid@gmail.com",
          customerMobile: "01834760591",
          customerName: "Masum Billah Sanjid",
          // That is the test signature key. But when you go to the production you must use your own signature key
          signature: "dbb74894e82415a2f7ff0ec3a97e4183",
           // That is the test storeID. But when you go to the production you must use your own storeID 
          storeID: "aamarpaytest", 
          // Use transactionAmountFromTextField when you pass amount with TextEditingController
          // transactionAmountFromTextField: amountTextEditingController,
          transactionAmount: "200",
          //The transactionID must be unique for every payment
          transactionID: "${DateTime.now().millisecondsSinceEpoch}",
          //The transactionID must be unique for every payment 
          transactionID: "transactionID",
          description: "test",
          // When the application goes to the producation the isSandbox must be false
          isSandBox: true,
          child: isLoading
              ? Center(
                  child: CircularProgressIndicator(),
                )
              : Container(
                  color: Colors.orange,
                  height: 50,
                  child: Center(
                    child: Text(
                      "Payment",
                      style: TextStyle(
                          fontWeight: FontWeight.bold, color: Colors.white),
                    ),
                  ),
                ),
        ),
      ),
    );
  }
}



Find more details in aamarPay