Last updated:
0 purchases
midtrans snap
Midtrans Snap #
Unofficial midtrans package. This package only supports the snap token flow.
Usage #
Add midtrans_snap as a dependency in your pubspec.yaml.
dependencies:
midtrans_snap: latest
copied to clipboard
Install it
flutter pub get
copied to clipboard
And use it
import 'package:flutter/material.dart';
import 'package:midtrans_snap/midtrans_snap.dart';
import 'package:midtrans_snap/models.dart';
main() => runApp(MaterialApp(
home: Scaffold(
body: MidtransSnap(
mode: MidtransEnvironment.sandbox,
token: 'SNAP_TOKEN',
midtransClientKey: 'CLIENT_KEY',
onPageFinished: (url) {
print(url);
},
onPageStarted: (url) {
print(url);
},
onResponse: (result) {
print(result.toJson());
},
),
),
));
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.