hyperpay 0.0.4-alpha hyperpay: ^0.0.4-alpha copied to clipboard
A plugin to wrap HyperPay mobile SDK for iOS and Android, used to accept payments in Flutter apps using HyperPay Payments Gateway.
import 'package:flutter/material.dart';
import 'package:hyperpay/hyperpay.dart';
import 'package:hyperpay_example/constants.dart';
import 'package:hyperpay_example/endpoint_setup.dart';
import 'package:hyperpay_example/checkout_view.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
setup();
super.initState();
}
setup() async {
await HyperpayPlugin.instance.setup(
config: TestConfig(),
checkoutEndpoint: checkoutEndpoint,
statusEndpoint: statusEndpoint,
);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: CheckoutView(),
);
}
}