Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

refactor line_items

  • Loading branch information...
commit f7336f9061d700e0b814e1f82e26489f7e2a0380 1 parent 3185545
@leondu leondu authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/active_merchant/billing/integrations/paypal/helper.rb
View
6 lib/active_merchant/billing/integrations/paypal/helper.rb
@@ -45,9 +45,9 @@ def initialize(order, account, options = {})
# add line item details, note the amount_x should be price instead of line total
def line_items(items = [])
items.each_with_index do |line, index|
- add_field("item_name_#{index+1}", line.item.item_name)
- add_field("amount_#{index+1}", line.price.value_without_unit)
- add_field("quantity_#{index+1}", line.quantity)
+ add_field("item_name_#{index+1}", line[:name])
+ add_field("amount_#{index+1}", line[:price])
+ add_field("quantity_#{index+1}", line[:quantity])
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.