Implement multi-step registration process: Add step indicators, error handling, and payment processing for membership registration. Enhance form validation and user feedback with success and error messages. Refactor state management for improved clarity and maintainability.

This commit is contained in:
Jennie Robinson Faber 2025-09-03 14:47:13 +01:00
parent a88aa62198
commit 2ca290d6e0
22 changed files with 1994 additions and 213 deletions

49
test-helcim-direct.js Normal file
View file

@ -0,0 +1,49 @@
// Direct test of Helcim API with your token
// Run with: node test-helcim-direct.js
const token = process.env.NUXT_PUBLIC_HELCIM_TOKEN || 'aG_Eu%lqXCIJdWb2fUx52P_*-9GzaUHAVXvRjF43#sZw_FEeV9q7gl$pe$1EPRNs'
async function testHelcimConnection() {
console.log('Testing Helcim API connection...')
console.log('Token length:', token.length)
console.log('Token prefix:', token.substring(0, 10) + '...')
try {
// Test 1: Try to get connection test
const testResponse = await fetch('https://api.helcim.com/v2/connection-test', {
method: 'GET',
headers: {
'accept': 'application/json',
'api-token': token
}
})
console.log('Connection test status:', testResponse.status)
const testData = await testResponse.text()
console.log('Connection test response:', testData)
// Test 2: Try to create a customer
const customerResponse = await fetch('https://api.helcim.com/v2/customers', {
method: 'POST',
headers: {
'accept': 'application/json',
'content-type': 'application/json',
'api-token': token
},
body: JSON.stringify({
customerType: 'PERSON',
contactName: 'Test User',
email: 'test@example.com'
})
})
console.log('\nCreate customer status:', customerResponse.status)
const customerData = await customerResponse.text()
console.log('Create customer response:', customerData)
} catch (error) {
console.error('Error:', error)
}
}
testHelcimConnection()