Compare commits

..
Author SHA1 Message Date
Unchained 31c6d2ce14 Merge dev: COD payment method implementation
Build and Deploy / build (push) Has been cancelled
Features:
- Add Cash on Delivery (COD) payment method
- Modular payment configuration system
- PaymentMethodSelector and PaymentMethodCard components
- 30-day money back guarantee badge
- Checkout language fix for multilingual emails
- Cart reset after order completion
- Service layer architecture

Note: Orders are UNCONFIRMED until manually confirmed in dashboard.
Auto-confirmation has permission issues in Saleor.
2026-03-29 19:40:03 +02:00
Unchained 7677037748 Merge feature/cash-on-delivery: COD payment method implementation
Features:
- Add Cash on Delivery (COD) payment method
- Modular payment configuration system
- Reusable PaymentMethodSelector and PaymentMethodCard components
- 30-day money back guarantee badge
- Checkout language fix for multilingual emails
- Cart reset after order completion
- Service layer architecture for checkout operations

Technical:
- Abstracted email system in saleor-core-extensions
- Payment method detection from order data
- Configuration-driven translations (EN, SR, DE, FR)

Note: Order auto-confirmation has permission issues in Saleor,
orders will be UNCONFIRMED until manually confirmed.
2026-03-29 19:33:18 +02:00
Unchained de4eb0852c feat: Add order auto-confirmation (best effort)
Added order confirmation after checkout completion.
Note: This requires MANAGE_ORDERS permission which currently
has the same bug as HANDLE_PAYMENTS. The try-catch ensures
checkout won't fail if confirmation fails. Orders will be
UNCONFIRMED until manually confirmed in dashboard.
2026-03-29 19:33:04 +02:00
2 changed files with 32 additions and 0 deletions
+16
View File
@@ -13,6 +13,7 @@ import { saleorClient } from "@/lib/saleor/client";
import { useAnalytics } from "@/lib/analytics";
import {
CHECKOUT_SHIPPING_ADDRESS_UPDATE,
ORDER_CONFIRM,
} from "@/lib/saleor/mutations/Checkout";
import { PaymentSection } from "./components/PaymentSection";
import { DEFAULT_PAYMENT_METHOD } from "@/lib/config/paymentMethods";
@@ -306,6 +307,21 @@ export default function CheckoutPage() {
setOrderNumber(result.order.number);
setOrderComplete(true);
// Auto-confirm the order
try {
console.log("Auto-confirming order:", result.order.id);
await saleorClient.mutate({
mutation: ORDER_CONFIRM,
variables: {
orderId: result.order.id,
},
});
console.log("Order confirmed successfully");
} catch (confirmError) {
console.error("Failed to auto-confirm order:", confirmError);
// Don't fail the checkout if confirmation fails
}
// Clear the checkout/cart from the store
clearCheckout();
+16
View File
@@ -224,3 +224,19 @@ export const TRANSACTION_CREATE = gql`
}
}
`;
export const ORDER_CONFIRM = gql`
mutation OrderConfirm($orderId: ID!) {
orderConfirm(id: $orderId) {
order {
id
number
status
}
errors {
field
message
}
}
}
`;