refactor(pricing): dynamic payment provider buttons with database-driven text
- Replace hardcoded provider-specific buttons with dynamic database-driven approach
- Update getPlanProviders() to include display_name from payment_providers table
- Simplify plan-card.blade.php with single if/else logic for all providers
- Move trial button outside loop and comment for future implementation
- Use "Pay with {display_name}" pattern for consistent button text
- Maintain special handling for activation_key provider with disabled state
This commit is contained in:
@@ -166,7 +166,9 @@ class Pricing extends Component
|
||||
->join('payment_providers', 'plan_providers.provider', '=', 'payment_providers.name')
|
||||
->where('payment_providers.is_active', true)
|
||||
->orderBy('plan_providers.sort_order')
|
||||
->pluck('plan_providers.provider')
|
||||
->select('plan_providers.provider', 'payment_providers.display_name')
|
||||
->get()
|
||||
->keyBy('provider')
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user