public void AliPay() { try { var payAmount = 0m; decimal.TryParse(txtPayAmount.Text, out payAmount); CurrentOrder.PayAmount = -payAmount; var onlinePayAmount = 0m; decimal.TryParse(txtOnlinePayAmount.Text, out onlinePayAmount); CurrentOrder.OnlinePayAmount = -onlinePayAmount; var lincenseCode = txtLicenseCode.Text; CurrentOrder.RefundAccount = txtRefundAccount.Text; _orderService.AliRefund(CurrentOrder.OrderId, lincenseCode, CurrentOrder.PayAmount, CurrentOrder.RefundAccount); PosForm.ClearItems(); MessageBox.Show("退款申请提交成功!", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Information); ClosePayForm(); } catch (AppException aex) { MessageBox.Show(aex.Message, "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); } catch (Exception ex) { AppContext.Log.Error(ex); MessageBox.Show(ex.Message, "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }