pass_mtx 0.0.17 copy "pass_mtx: ^0.0.17" to clipboard
pass_mtx: ^0.0.17 copied to clipboard

Pass Micro Transaction Module - Register your bank cards to PASS application and make your transaction the most convenient and fastest way. PASS.MN

Pass Micro Transaction #

https://developer.pass.mn/

Platform Support #

Android iOS MacOS Web Linux Windows
✔️ ✔️ TODO TODO TODO TODO

🔨 Installation #

dependencies:
  pass_mtx: ^0.0.17

⚙ Import #

import 'package:pass_mtx/pass_mtx.dart';

🕹️ Usage/Example #

Initialization & Check connection #

Development purpose you can use init function for select environment of PASS Purchase or other methods. When development done, change it to initProd.

  import 'package:pass_mtx/pass_mtx.dart';

  // Initialize For Staging ENV using AppID ClientID, PrivateKey, PublicKey,
  init(String appId, String clientId, String privatePem, String publicPem);

  // Initialize For Production ENV using AppID ClientID, PrivateKey, PublicKey,
  initProd(String appId, String clientId, String privatePem, String publicPem);

  // Get Pass API Status
  getPassPing();

  // Get Pass Version Info
  getPassVersion();

  // Initialization example using 'kReleaseMode'
  if (kReleaseMode) {
    passInitResult = await _passMtxPlugin.initProd(
            appId, clientId, privatePem, publicPem) ??
        'Unknown platform version';
  } else {
    passInitResult =
        await _passMtxPlugin.init(appId, clientId, privatePem, publicPem) ??
            'Unknown platform version';
  }

Card Methods #

Included methods of Card registration and Get card lists you added in PASS wallet or delete it.

  // Get card token by UserID
  getCard(String userId);

  // Saving user card info
  saveCard(String userId, String szPan, String cvv, String expDate, String cardHolderName);
  
  // Verify Card
  verifyCard(String userId, String verificationMethod, String verificationValue)

  // Delete User card
  deleteCard(String userId);

Purchase #

Pass MTX included micro transaction method makePassPurchase. paymentAmount field need to multiple by 100 for original amount. If user enters 1000 in controller, multiply it 1000 * 100 than send it through paymentAmount field. HEY PASS ME...

  // Make Pass Purchase
  makePassPurchase( String userId, String orderId, String paymentToken, String expDate, String paymentAmount, String dbRefNo, String description)

  // Make Purchase Example
  TextEditingController amountController = TextEditingController(); // when 1000 in controller text

  String amount = amountController.text;

  String realAmount = (int.parse(amount) * 100).toString();

  try {
    passPurchaseResult = await _passMtxPlugin.makePassPurchase(
          "1", // userId
          "pass_inapp_txn_1", // orderId
          tokenController.text, // paymentToken
          "2509", // expDate
          realAmount, // paymentAmount
          "DTB${DateTime.now().toIso8601String()}", // dbRefNo
          "pass txn test", // description
        ) ??
        'Make Purchase Failed';
  } on PlatformException {
    passPurchaseResult = 'Failed to get platform version.';
  }

📃 License #

/*
#################################################################################
#                                                                               #
#                     COPYRIGHT (C) DATABANK LLC since 2017                     #
#                                                                               #
#          ALL RIGHTS RESERVED BY DATABANK LLC.  THIS PROGRAM MUST BE           #
#          USED SOLELY FOR THE PURPOSES OF DATABANK LLC AND ITS USERS.          #
#   NO PART OF THIS PROGRAM MAY BE MODIFIED IN SOURCE OR BINARY FORM BY OTHERS  #
#             WITHOUT THE PRIOR WRITTEN PERMISSION OF DATABANK LLC.             #
#                                                                               #
#     USE OF COPYRIGHT NOTICE DOES NOT EVIDENCE PUBLICATION OF THE PROGRAM.     #
#                                                                               #
#################################################################################
*/
3
likes
0
pub points
20%
popularity

Publisher

verified publisherdatabank.mn

Pass Micro Transaction Module - Register your bank cards to PASS application and make your transaction the most convenient and fastest way. PASS.MN

Homepage

License

unknown (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on pass_mtx