|
@@ -158,7 +158,6 @@ namespace WingPaymentService.Service
|
|
|
isSuccess = await WeChatCallback(request);
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
return new PayCallbackDTO { IsSuccess = isSuccess };
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -193,7 +192,12 @@ namespace WingPaymentService.Service
|
|
|
var totalAmount = keyValuePairs.GetValueOrDefault("total_amount");
|
|
|
var payStatus = keyValuePairs.GetValueOrDefault("trade_status") == "TRADE_SUCCESS" ? WingInterfaceLibrary.Enum.PayStatusEnum.Paid : WingInterfaceLibrary.Enum.PayStatusEnum.NoPay;
|
|
|
var payTime = DateTime.UtcNow;
|
|
|
- return await PayRecordWriteRes(orderCode, recordCode, totalAmount, payStatus, payTime, request);
|
|
|
+ var success = await PayRecordWriteRes(orderCode, recordCode, totalAmount, payStatus, payTime, request);
|
|
|
+ if(success)
|
|
|
+ {
|
|
|
+ _recordRelation.TryRemove(recordCode, out _);
|
|
|
+ }
|
|
|
+ return success;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|