基础库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 rivejä
653 B

  1. import 'package:tobias/tobias.dart' as tobias;
  2. ///支付宝支付
  3. class AliPayUtil{
  4. ///orderCode 为后端返回支付Code字符串
  5. ///返回true表示支付成功,false表示支付失败
  6. static Future<bool> toPay(String orderCode)async{
  7. Map<dynamic,dynamic> result= await tobias.aliPay(orderCode);
  8. if(result!=null&&result['resultStatus']!=null&&result['resultStatus'].toString()=="9000"){
  9. print("支付宝支付结果");
  10. print(result);
  11. return true;
  12. }else{
  13. return false;
  14. }
  15. }
  16. ///检查是否安装了支付宝
  17. static Future<bool> isInstallAliPay() async {
  18. return await tobias.isAliPayInstalled();
  19. }
  20. }