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
+1 -2
View File
@@ -32,8 +32,7 @@ module RegistrationHelper
steps -= [:hosting]
end
steps -= [:payment] unless registration.conference.paypal_email_address.present? && registration.conference.paypal_username.present? && registration.conference.paypal_password.present? && registration.conference.paypal_signature.present?
steps -= [:payment, :workshops] if registration.is_attending == 'n'
steps -= [:payment, :workshops] if registration.is_attending == 'n'
steps.each do |step|
# disable the step if we've already found an incomplete step
@@ -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