gateway_sdk 0.0.2
gateway_sdk: ^0.0.2 copied to clipboard
Omipay Gateway SDK
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:gateway_sdk/gateway_sdk.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
initPlatformState();
// _gatewaySdkPlugin.htmlOpenLink();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Omipay Payment Gateway'),
),
body: Column(
children: const [
Expanded(child: GatewaySdk(
price: '500000',
paymentMethodId: 1095,
returnUrl: 'http://10.0.9.18:8090/test_checkout/checkout_v1/success.php',
cancelUrl: 'http://10.0.9.18:8090/test_checkout/checkout_v1/error.php',
notifyUrl: 'http://10.0.9.18:8090/test_checkout/checkout_v1/success.php',
merchantId: '64875',
merchantPass: '09217d13ecfa5680557171e6a203d2b9',
receiverEmail: 'trungnv@htpgroup.com.vn',
)),
],
)
),
);
}
}