|
|
@@ -817,7 +817,7 @@ class NewDiscountController extends BaseController
|
|
|
|
|
|
Future.delayed(const Duration(seconds: 20), () {
|
|
|
CustomLoadingDialog.hide();
|
|
|
- ToastUtil.show("Restore record not found");
|
|
|
+ ToastUtil.show("没有发现可恢复的记录");
|
|
|
});
|
|
|
|
|
|
final result = await ApplePay().restore();
|
|
|
@@ -828,7 +828,7 @@ class NewDiscountController extends BaseController
|
|
|
checkRestoreStatus(receipt);
|
|
|
} else {
|
|
|
CustomLoadingDialog.hide();
|
|
|
- ToastUtil.show("Pay Error");
|
|
|
+ ToastUtil.show("恢复失败");
|
|
|
print('恢复失败: ${result['error']}');
|
|
|
}
|
|
|
|
|
|
@@ -851,15 +851,18 @@ class NewDiscountController extends BaseController
|
|
|
int payPlatform = paymentWay.payPlatform;
|
|
|
int payMethod = paymentWay.payMethod;
|
|
|
// var code = await storeRepository.resume(payPlatform, payMethod, receiptData);
|
|
|
- storeRepository.subscribeResume(payPlatform, payMethod, receiptData).then((data) {
|
|
|
- CustomLoadingDialog.hide();
|
|
|
- ToastUtil.show("Restore success");
|
|
|
- accountRepository.getUserInfo();
|
|
|
- Get.back();
|
|
|
- }).catchError((error) {
|
|
|
- CustomLoadingDialog.hide();
|
|
|
- ToastUtil.show("Restore fail");
|
|
|
- });
|
|
|
+ storeRepository
|
|
|
+ .subscribeResume(payPlatform, payMethod, receiptData)
|
|
|
+ .then((data) {
|
|
|
+ CustomLoadingDialog.hide();
|
|
|
+ ToastUtil.show("恢复成功");
|
|
|
+ accountRepository.getUserInfo();
|
|
|
+ Get.back();
|
|
|
+ })
|
|
|
+ .catchError((error) {
|
|
|
+ CustomLoadingDialog.hide();
|
|
|
+ ToastUtil.show("恢复失败");
|
|
|
+ });
|
|
|
|
|
|
// if (code == 0) {
|
|
|
// CustomLoadingDialog.hide();
|