rms_mobile_xdk_flutter 3.33.0 copy "rms_mobile_xdk_flutter: ^3.33.0" to clipboard
rms_mobile_xdk_flutter: ^3.33.0 copied to clipboard

discontinuedreplaced by: fiuu_mobile_xdk_flutter
outdated

RMS Mobile Payment for Flutter

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:rms_mobile_xdk_flutter/rms_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_username': 'RMSxdk_2022',
                    'mp_password': 'RMSpwd@2022',
                    'mp_merchant_ID': 'rmsxdk_mobile_Dev',
                    'mp_app_name': 'mobile',
                    'mp_verification_key': 'ee738b541eff7b6b495e44771f71c0ec',

                    // Mandatory String. Payment values
                    'mp_order_ID': '60186547890',
                    // Mandatory String. A value more than '1.00'
                    'mp_amount': '1.01',
                    'mp_currency': 'MYR',
                    'mp_country': 'MY',

                    // Optional String.
                    'mp_channel': 'multi',
                    // Use 'multi' for all available channels option. For individual channel seletion, please refer to "Channel Parameter" in "Channel Lists" in the MOLPay API Spec for Merchant pdf.
                    'mp_bill_description': 'Reload Social Credit',
                    'mp_bill_name': 'Razer Merchant',
                    'mp_bill_email': 'faris.kamarudin@razer.com',
                    'mp_bill_mobile': '+60102338716',

                    '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_mc2p_key': [],
                  };

                  String? result = await MobileXDK.start(paymentDetails);
                  print("Result" + result!);
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
12
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

RMS Mobile Payment for Flutter

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on rms_mobile_xdk_flutter

Packages that implement rms_mobile_xdk_flutter