Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
KjellBerlin committed Aug 28, 2024
1 parent 8562dab commit 166157d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/carbonara/core/order/OrderService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class OrderService(

private suspend fun handleUnpaidOrder(paymentId: String, paymentStatus: PaymentStatus) {
val order = retrieveOrderFromDatabase(paymentId)
updateOrderToFailed(order, paymentStatus)
updateOrderToPaymentFailed(order, paymentStatus)
}

private suspend fun updateOrderToPaid(order: OrderDao, paymentStatus: PaymentStatus) {
Expand All @@ -118,7 +118,7 @@ class OrderService(
}
}

private suspend fun updateOrderToFailed(order: OrderDao, paymentStatus: PaymentStatus) {
private suspend fun updateOrderToPaymentFailed(order: OrderDao, paymentStatus: PaymentStatus) {
log.info("Retrieved payment status={} for orderId={}, now processing order", paymentStatus, order.orderId)
val updatedOrder = order.copy(
paymentDetails = order.paymentDetails.copy(internalPaymentStatus = InternalPaymentStatus.FAILED),
Expand Down

0 comments on commit 166157d

Please sign in to comment.