flulm_auth 0.1.3
flulm_auth: ^0.1.3 copied to clipboard
The version of the flutter SDK licensed by lemapay is currently only available for the Android system, to be added to the iOS system call.
import 'package:flulm_auth/flulm_auth.dart' as flulmAuth;
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _code = 'Unknown';
String _appId = "2003252132219126236";
@override
void initState() {
super.initState();
flulmAuth.register(appId: _appId);
flulmAuth.responseFromAuth.listen((data) {
setState(() {
_code = data.code;
});
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('callback code= $_code\n'),
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () {
flulmAuth.sendPay(
openId: "2003252132219126236",
appKey: "e61956c42774eaa2d6359a3d377c5bad",
prepayId: "2003262001319289588",
coOrderId: "1585224080764",
payH5Url: "http://payapi1.lemajestic.com/h5/?order_id=2003262001319289588&co_order_id=1585224080764&amount=66&pay_amount=66¤cy_code=USD&addtime=1585224091&shop_name=langrensha&subject=%E5%A5%BD%E6%B6%88%E6%81%AF%E5%A5%BD%E6%B6%88%E6%81%AF%EF%BC%8C%E5%95%86%E5%93%81%E5%A4%A7%E7%94%A9%E5%8D%96&app_id=2003252132219126236&status=-1&pay_status=0¤cy_name=%E7%BE%8E%E5%85%83&sign=436D66E76547A50358C36FE6C9B6748D&type=h5paypackageValue:com.awesome.lemapaysdkdemo",
packageValue: "com.awesome.flulm_auth_example",
nonceStr: "random_nonce",
timeStamp: "1585224091841",);
}),
),
);
}
}