Reputation: 1
const makePayment = async (e) => {
e.preventDefault();
fetch('/app/api/payment', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
}
})
.then((response) => response.json())
.then((data) => {
console.log(data)
})
.catch((error) => {
console.error(error);
console.log('Payment response:', data);
});
}
this payment handler when i click btn then show server error 500 this payment handler when i click btn then show server error 500
Upvotes: 0
Views: 176