Skip to content

Commit

Permalink
Add Square details
Browse files Browse the repository at this point in the history
  • Loading branch information
Ligator committed Oct 1, 2022
1 parent 01d59d8 commit 927278c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/active_merchant/billing/gateways/square.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ def add_application_fee(post, money, options)
end
end

def add_details(post, options)
post[:note] = options[:note] if options[:note].present?
post[:reference_id] = options[:reference_id] if options[:reference_id].present?
post[:location_id] = options[:location_id] if options[:location_id].present?
end

def create_post_for_auth_or_purchase(money, payment, options)
post = {}

Expand All @@ -171,6 +177,7 @@ def create_post_for_auth_or_purchase(money, payment, options)
add_idempotency_key(post, options)
add_amount(post, money, options)
add_application_fee(post, options[:application_fee], options)
add_details(post, options)

post
end
Expand Down

0 comments on commit 927278c

Please sign in to comment.