app/views/spree/checkout/_payment.html.erb in spree_frontend-4.1.0.rc3 vs app/views/spree/checkout/_payment.html.erb in spree_frontend-4.1.0

- old
+ new

@@ -9,10 +9,12 @@ <ul id="payment-method-fields" class="list-unstyled position-relative" data-hook> <% @order.available_payment_methods.each do |method| %> <li class="radio"> <%= label_tag '', class: "form-check-label spree-radio-label payment-option", data: { type: method.id == @payment_sources&.first&.payment_method_id ? 'card' : nil } do %> - <%= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, method == @order.available_payment_methods.first %> + <%= radio_button_tag "order[payments_attributes][][payment_method_id]", + method.id, + method.id == @order.payments.checkout.last&.payment_method_id || method == @order.available_payment_methods.first %> <span class="spree-radio-label-custom-input"></span> <%= Spree.t(method.name, scope: :payment_methods, default: method.name) %> <% end %> </li> <% end %>