private void SavePayResponseHistory(IResponse response, bool success) { var result = response as BarcodePayResponse; var payHistory = new PaymentHistory(); payHistory.LogWechatBarcodeResponsePay(result.OutTradeNo, result.TotalAmount.ToString(), "saleorder", result.Raw, success); _db.Insert(payHistory); _db.SaveChange(); }