Javascript 部分
fetch('./purchase.php', { method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ 'product_id': 1, 'order_amount': 2, })…