Implement PayPal fallback for registration payment process and update localization for fallback option (changes button). TODO still need to get fallback working properly in regards to the payment buttons.

This commit is contained in:
2026-01-31 19:05:30 +00:00
parent 1ce328511a
commit f8b504827c
6 changed files with 60 additions and 5 deletions
@@ -4,7 +4,13 @@
= save_registration_step do
.vertical-registration-step-options
.options
- paypal_configured = @this_conference.paypal_email_address.present? && @this_conference.paypal_username.present? && @this_conference.paypal_password.present? && @this_conference.paypal_signature.present?
- @payment_methods.each do |option|
- class_name = [:unstyled]
- class_name << :selected if @payment_method.present? && @payment_method.to_sym == option
= button "payment_#{option}".to_sym, value: option, class: class_name
- if !paypal_configured && option.to_sym == :paypal
- class_name = [:unstyled]
- class_name << :selected if @payment_method.present? && @payment_method.to_sym == option
= button "payment_paypal_fallback".to_sym, value: option, class: class_name
- elsif option.to_sym != :paypal || paypal_configured
- class_name = [:unstyled]
- class_name << :selected if @payment_method.present? && @payment_method.to_sym == option
= button "payment_#{option}".to_sym, value: option, class: class_name