ok
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "PORT=3002 react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
|
|||||||
@@ -104,10 +104,20 @@ const Checkout = ({ socketId, transactionSuccess }) => {
|
|||||||
setLoadingPay(true);
|
setLoadingPay(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
const newName = urlParams.get('new_name'); // Ambil dari URL asli
|
||||||
|
const setName = urlParams.get('set_name'); // Ambil dari URL asli
|
||||||
|
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
itemIds.forEach((id) => params.append('itemsId', id));
|
itemIds.forEach((id) => params.append('itemsId', id));
|
||||||
params.append('socketId', socketId);
|
params.append('socketId', socketId);
|
||||||
// Jika butuh socketId bisa tambahkan di sini, misal: params.append('socketId', socketId);
|
if (newName) {
|
||||||
|
params.append('newName', newName);
|
||||||
|
}
|
||||||
|
if (setName) {
|
||||||
|
params.append('setName', setName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const response = await fetch('https://bot.kediritechnopark.com/webhook/store-dev/pay', {
|
const response = await fetch('https://bot.kediritechnopark.com/webhook/store-dev/pay', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
Reference in New Issue
Block a user