mirror of
https://github.com/marcusDenslow/terminalShop.git
synced 2026-10-25 02:52:20 +02:00
fix(tui): change the stripe abandoned payment polling duration from 2 to 10 mins
This commit is contained in:
@@ -946,7 +946,7 @@ func (m Model) collectCardCmd() tea.Cmd {
|
||||
}
|
||||
|
||||
const ordersPollInterval = 10 * time.Second
|
||||
const cardPollTimeout = 2 * time.Minute
|
||||
const cardPollTimeout = 10 * time.Minute
|
||||
|
||||
type OrdersPollTickMsg struct{}
|
||||
|
||||
|
||||
@@ -374,7 +374,10 @@ func (m Model) renderPaymentHttpsView() string {
|
||||
accentStyle := m.theme.TextHighlight()
|
||||
|
||||
if m.payment.collectTimeOut {
|
||||
return m.theme.TextError().Bold(true).Render("payment link timed out") + "\n\n" + baseStyle.Render("no card saved after 2 minutes.") + "\n" + baseStyle.Render("press ") + accentStyle.Render("esc") + baseStyle.Render(" to go back and try again")
|
||||
minutes := int(cardPollTimeout / time.Minute)
|
||||
return m.theme.TextError().Bold(true).Render("payment link timed out") + "\n\n" +
|
||||
baseStyle.Render(fmt.Sprintf("no card saved after %d minutes.", minutes)) + "\n" +
|
||||
baseStyle.Render("press ") + accentStyle.Render("esc") + baseStyle.Render(" to go back and try again")
|
||||
}
|
||||
|
||||
if m.payment.collectURL == nil {
|
||||
|
||||
Reference in New Issue
Block a user