Webshop: fehlendes Stripe-Plattformprofil klar melden statt 'Stripe nicht erreichbar'

Lehnt Stripe die Kontoanlage ab, weil das Connect-Plattformprofil von WEBklar fehlt (oder Connect nicht aktiv ist),
bekommt der Kunde 503 'plattform_nicht_bereit' mit eigenem Du-Text, und das Log nennt die Ursache (ohne Stripe-Text).
Gefunden im Pilot 2026-10-06.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-06 08:58:20 +00:00
1 parent 50f854ef1c
commit 8814c4aef1
2 files changed
+31

No files matched your search

+23
View File
@@ -188,6 +188,29 @@ test('Stripe-Fehler: 502 mit festem Du-Text, nie der Stripe-Text; bei gescheiter
assert.equal(log.some((l) => l.includes('Geheim') || l.includes('sk_live')), false)
})
test('Plattformprofil fehlt (Connect nicht fertig): 503 mit eigenem Du-Text und Code, fester Logeintrag ohne Stripe-Text', async () => {
const feature = await aktiviere()
const log = []
const orig = console.error
console.error = (...a) => log.push(a.join(' '))
try {
for (const message of [
'You must complete your platform profile to use Connect and create live connected accounts. Visit your dashboard at https://dashboard.stripe.com/connect/accounts/overview to answer the questionnaire.',
"You can only create new accounts if you've signed up for Connect, which you can learn how to do at https://stripe.com/docs/connect.",
]) {
st.failNext({ method: 'POST', path: '/v1/accounts', status: 400, message })
const a = await post('einrichten')
assert.deepEqual([a.status, a.body.code, a.body.error], [503, 'plattform_nicht_bereit', 'Die Stripe-Anbindung ist bei WEBklar noch nicht fertig eingerichtet. Wir kümmern uns darum – schreib uns gern im Chat.'])
assert.equal(JSON.stringify(a.body).includes('dashboard.stripe.com'), false)
}
assert.equal(shopConfigDoc(feature).stripeAccountId || '', '')
} finally {
console.error = orig
}
assert.equal(log.filter((l) => l.includes('Plattformprofil')).length, 2)
assert.equal(log.some((l) => l.includes('questionnaire') || l.includes('stripe.com')), false)
})
test('Kundenansicht: der Wächter sperrt die Routen (nicht auf der Erlaubnisliste), der Router selbst auch ohne Wächter (Kundenansicht und Ansehen als)', async () => {
const feature = await aktiviere()
for (const pfad of ['einrichten', 'link', 'aktualisieren']) {