app/views/spree/checkout/payment/_affirm.html.erb in spree_affirm-0.2.20 vs app/views/spree/checkout/payment/_affirm.html.erb in spree_affirm-0.2.21
- old
+ new
@@ -88,13 +88,13 @@
},
<% if @order.promotions.any? %>
discounts: {
- <% @order.promotions.each do |promo| %>
- "<%= promo.code %>": {
- discount_amount: <%= (0-promo.credits.sum(:amount)*100).to_i %>,
- discount_display_name: "<%= promo.name %>"
+ <% @order.adjustments.promotion.each do |adjustment| %>
+ "<%= adjustment.label %>": {
+ discount_amount: <%= (0-adjustment.amount*100).to_i %>,
+ discount_display_name: "<%= adjustment.label %>"
},
<% end %>
},
<% end %>