File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
import 'dart:async' ;
2
2
import 'dart:convert' ;
3
+ import 'dart:io' ;
3
4
4
5
import 'package:http/http.dart' as http;
5
6
import 'package:flutter/material.dart' ;
@@ -57,7 +58,7 @@ class _AlipayDemoState extends State<AlipayDemo> {
57
58
final String payInfo = await _sendPaymentParameters (result.content);
58
59
print ("返回结果$payInfo " );
59
60
} else {
60
- _neverSatisfied (result.message);
61
+ _neverSatisfied ("错误编码: ${ result .code }, 错误信息: ${ result . message }" );
61
62
}
62
63
} on PlatformException catch (e) {
63
64
_neverSatisfied (e.message);
@@ -106,6 +107,8 @@ class _AlipayDemoState extends State<AlipayDemo> {
106
107
result = Post (code: 408 , message: e.message, content: e.toString ());
107
108
} on FormatException catch (e) {
108
109
result = Post (code: 405 , message: e.message, content: e.toString ());
110
+ } on SocketException catch (e) {
111
+ result = Post (code: 407 , message: e.message, content: e.toString ());
109
112
}
110
113
return result;
111
114
}
You can’t perform that action at this time.
0 commit comments