pay static method

Future pay(
  1. int amount,
  2. String orderId,
  3. PaymeSdkFlutterPayCode payCode, {
  4. String? storeId,
  5. String? userName,
  6. String? note,
  7. String? extraData,
  8. bool isShowResultUI = true,
})

Implementation

static Future<dynamic> pay(
  int amount,
  String orderId,
  PaymeSdkFlutterPayCode payCode, {
  String? storeId,
  String? userName,
  String? note,
  String? extraData,
  bool isShowResultUI = true,
}) async {
  final args = {
    'amount': amount,
    'store_id': storeId,
    'user_name': userName,
    'order_id': orderId,
    'pay_code': _enumValue(payCode),
    'note': note,
    'extra_data': extraData,
    'is_show_result_ui': isShowResultUI,
  };
  final rs = await _channel.invokeMethod('pay', args);
  if (Platform.isAndroid && rs is String) {
    return jsonDecode(rs);
  }
  return rs;
}