+
+
+
Services
+
+ {#each booking.services ?? [] as service, index (index)}
+
+ {service.service_name || 'Unknown Service'}
+
+ {service.override_price ? formatCurrency(Math.round(service.override_price * 100)) : service.price ? formatCurrency(Math.round(service.price * 100)) : '-'}
+
+
+ {/each}
+
+
+
+
+
+
+ Total
+ {formatCurrency(Math.round(booking.total_amount * 100))}
+
+
+ Amount Paid
+ {formatCurrency(totalPaid)}
+
+
+ Amount Remaining
+
+ {formatCurrency(Math.round(amountRemaining * 100))}
+
+
+
+
+
+ {#if status === 'idle' && authStore.isAuthenticated}
+ {#if paymentMethodsLoading}
+
Loading payment methods...
+ {:else if paymentMethods.length > 0 && !showNewCardForm}
+
+
+ {#if selectedPaymentMethod}
+ {#each paymentMethods as method (method.id)}
+ {#if method.id === selectedPaymentMethod}
+
+ {/if}
+ {/each}
+ {/if}
+ {#if canSaveCards}
+
+ {/if}
+
+ {#if showCardList}
+
+ {#if canSaveCards}
+
{
+ showNewCardForm = true;
+ showCardList = false;
+ selectedPaymentMethod = null;
+ }}
+ >
+
Enter card details
+
+
+ {/if}
+ {#each paymentMethods as method (method.id)}
+
+ {/each}
+
+ {/if}
+
+ {:else}
+
+
+
Card Details
+
+
+
+
+
+
+ {#if canSaveCards}
+
+
+
+
+ {/if}
+
+
+ {/if}
+ {/if}
+
+
+ {#if isScenarioA}
+
+
+
+
+
+
+
+
+ {#if payButtonError}
+
{payButtonError}
+ {/if}
+
+
+ {/if}
+
+
+ {#if isScenarioB}
+
+
+
+
+
+
+
+
+ {#if paymentType === 'partial'}
+
+
+
+ £
+
+
+
+ {/if}
+
+
+ {#if payButtonError}
+
{payButtonError}
+ {/if}
+
+
+ {/if}
+
+ {#if status === 'error' && error}
+
+ {/if}
+
+
+
+
+ {:else if status === 'polling'}
+
+