Skip to content

Commit

Permalink
do not generate new order when nothing is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-zhang-awx committed Nov 7, 2024
1 parent e8006d6 commit 6b24a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private function savePaymentOrPlaceOrder(
public function orderThenIntent(Quote $quote, $uid, string $cartId, PaymentInterface $paymentMethod, ?AddressInterface $billingAddress, ?string $email, ?string $paymentMethodId, ?string $from, PlaceOrderResponse $response): PlaceOrderResponse
{
$order = $this->getOrderByQuote($quote);
$isRequiredToGenerateNewOrder = true;
$isRequiredToGenerateNewOrder = false;
if ($order->getId()) {
$paymentIntent = $this->paymentIntentRepository->getByOrderId($order->getId());
if ($paymentIntent) {
Expand Down

0 comments on commit 6b24a79

Please sign in to comment.