fix order placement error
Some checks failed
Build and Push Backend / docker (push) Failing after 6s
Some checks failed
Build and Push Backend / docker (push) Failing after 6s
This commit is contained in:
@@ -31,6 +31,11 @@ abstract class AbstractOrderPlacementStrategy implements OrderPlacementStrategy
|
||||
boolean shouldDeduct = command.isDeductBalance() && service.shouldDeductBalance(context);
|
||||
if (shouldDeduct) {
|
||||
service.validateSufficientBalance(context.getPurchaserBy(), netAmount);
|
||||
}
|
||||
|
||||
PlayOrderInfoEntity order = service.createOrderRecord(context);
|
||||
|
||||
if (shouldDeduct) {
|
||||
service.deductCustomerBalance(
|
||||
context.getPurchaserBy(),
|
||||
netAmount,
|
||||
@@ -38,8 +43,6 @@ abstract class AbstractOrderPlacementStrategy implements OrderPlacementStrategy
|
||||
context.getOrderId());
|
||||
}
|
||||
|
||||
PlayOrderInfoEntity order = service.createOrderRecord(context);
|
||||
|
||||
OrderAmountBreakdown amountBreakdown =
|
||||
breakdown != null ? breakdown : service.fallbackBreakdown(paymentInfo);
|
||||
return OrderPlacementResult.of(order, amountBreakdown);
|
||||
|
||||
Reference in New Issue
Block a user