// Force-confirm the most recent pending payment_session so the customer
// advances past the waiting-payment screen without going through real
// Xendit. Backed by /internal/_test/force-confirm-payment.
const url = BACKEND_INTERNAL_URL || 'http://localhost:3001'
const resp = http.post(`${url}/internal/_test/force-confirm-payment`, {
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ latest: true }),
})
if (resp.status !== 200) {
  throw new Error(`force-confirm-payment failed (${resp.status}): ${resp.body}`)
}
