@codesinger0/shared-components 1.1.36 → 1.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,6 +42,7 @@ const OrderForm = ({
|
|
|
42
42
|
addToast, // Inject toast function
|
|
43
43
|
cartItems,
|
|
44
44
|
totalPrice,
|
|
45
|
+
paymentLinkCreationURL
|
|
45
46
|
}) => {
|
|
46
47
|
|
|
47
48
|
const [nameError, setNameError] = useState('');
|
|
@@ -127,7 +128,7 @@ const OrderForm = ({
|
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
130
|
|
|
130
|
-
const response = await fetch(
|
|
131
|
+
const response = await fetch(paymentLinkCreationURL, {
|
|
131
132
|
method: 'POST',
|
|
132
133
|
headers: {
|
|
133
134
|
'Content-Type': 'application/json'
|
|
@@ -373,8 +374,8 @@ const OrderForm = ({
|
|
|
373
374
|
};
|
|
374
375
|
|
|
375
376
|
// Create payment link
|
|
376
|
-
|
|
377
|
-
const paymentResponse = await simulatePaymentLinkCreation(orderData);
|
|
377
|
+
const paymentResponse = await createPaymentLink(orderData);
|
|
378
|
+
// const paymentResponse = await simulatePaymentLinkCreation(orderData);
|
|
378
379
|
|
|
379
380
|
if (paymentResponse.success) {
|
|
380
381
|
// Create order items in the format expected by the database
|