Tuna Payments Dart SDK

Features

  • Tokenization methods ready to use. You can call /Generate, /Bind, /Delete, /List
  • 3DS methods allowing you to create a safer payment step

Usage

Tokenization example

  var tokenizer = await Tokenizer.create('a3823a59-66bb-49e2-95eb-b47c447ec7a7', 'demo', customer, "14", env: "sandbox");
  var cardData = CardData(cardNumber: "4756169062715850", cardHolderName: "Example Card", expirationMonth: 10, expirationYear: 2025, cvv: "257");
  var generateResponse = await tokenizer.generate(cardData);

3DS example

    _threeDS = ThreeDS(
      (message) async {
        if (message == "Data collection ready") {
          var initResponse = await callInit(generateResponse, _cardData);
          var threeDSInfo = ThreeDSInfo.fromJson(initResponse["methods"][0]["threeDSInfo"]);
          _threeDS.loadChallengeFrame(threeDSInfo);
        }
      },
    );

    _threeDS.loadDataCollectionFrame(generateResponse.authenticationInformation!.accessToken!, generateResponse.authenticationInformation!.deviceDataCollectionUrl!);

Additional information

Full example of using the Tokenizer you can find at tuna_sdk_test.dart. To see the 3DS payment methods, run the example flutter app at /example folder

Libraries

tuna_sdk