import 'tzcash_platform_interface.dart';

class Tzcash {
  Future<String?> getPlatformVersion() {
    return TzcashPlatform.instance.getPlatformVersion();
  }

  ///{
  /// 'env':1(1:测试环境,2:正式环境)
  /// 'orderInfo':{
  ///  }
  ///}
  Future<String?> callPayment(Map<String, dynamic> orderInfo) {
    return TzcashPlatform.instance.callPayment(orderInfo);
  }

  void onTZAppPay(Function(String) callback) {
    TzcashPlatform.instance.onTZAppPay(callback);
  }

  void onMiniProgramPay(Function(String) callback) {
    TzcashPlatform.instance.onMiniProgramPay(callback);
  }
}
