This commit is contained in:
2025-09-25 03:50:23 +05:00
parent 696edbca1d
commit 36e19054e8

View File

@@ -17,6 +17,7 @@ export const orderApi = baseApi.injectEndpoints({
orderDetails.shipping_method = 'standart'; orderDetails.shipping_method = 'standart';
orderDetails.delivery_time = '13:00 - 18:00'; orderDetails.delivery_time = '13:00 - 18:00';
orderDetails.region = 'ag'; orderDetails.region = 'ag';
orderDetails.payment_type_id = 3;
return { return {
url: "/orders", url: "/orders",
@@ -29,11 +30,14 @@ export const orderApi = baseApi.injectEndpoints({
}; };
}, },
transformResponse: (response, meta, arg) => { transformResponse: (response, meta, arg) => {
console.log({response: response}) if (response && response.data) {
// if (response && response.data) { if (response.data.payment_url) {
// return response.data; window.open(response.data.payment_url, '_blank').focus();
// } }
// return "Order placed";
return response.data;
}
return "Order placed";
}, },
transformErrorResponse: (response, meta, arg) => { transformErrorResponse: (response, meta, arg) => {