fiuu_mobile_xdk_flutter 3.34.0 fiuu_mobile_xdk_flutter: ^3.34.0 copied to clipboard
Fiuu Mobile Payment for Flutter
import 'package:flutter/material.dart';
import 'package:fiuu_mobile_xdk_flutter/fiuu_mobile_xdk_flutter.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return new MaterialApp(
home: new Scaffold(
appBar: new AppBar(
title: new Text('RMS XDK Example'),
),
body: new Center(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new ElevatedButton(
child: const Text('Start XDK'),
onPressed: () async {
var paymentDetails = {
// Mandatory String. Values obtained from MOLPay
"mp_bill_description": "",
"mp_bill_name": "",
"mp_verification_key": "",
"mp_username": "",
"mp_merchant_ID": "",
"mp_app_name": "",
"mp_bill_email": "",
"mp_country": "MY",
"mp_amount": "1.01",
"mp_bill_mobile": "",
"mp_order_ID": "", //HB23111517727
"mp_channel": "multi",
"mp_currency": "MYR",
"mp_password": "",
'mp_silent_error': false,
'mp_sandbox_mode': false,
'mp_dev_mode': false,
'mp_express_mode': false,
'mp_preferred_token': 'new',
'mp_ap_merchant_ID': '',
'mp_advanced_email_validation_enabled': false,
'mp_advanced_phone_validation_enabled': false,
'mp_bill_name_edit_disabled': false,
'mp_bill_email_edit_disabled': false,
'mp_bill_mobile_edit_disabled': false,
'mp_bill_description_edit_disabled': false,
'mp_editing_enabled': false,
'mp_disabled_channels': ['enetsD'],
'mp_dpa_id': '',
'mp_company': '',
'mp_allowed_channels': ['ApplePay, credit23'],
'mp_mc2p_key': [],
};
String? result = await MobileXDK.start(paymentDetails);
print("Result" + result!);
},
),
],
),
),
),
);
}
}