Skip to content

Commit

Permalink
Merge pull request solidusio#7 from TommyJohnWear/fix/store-credit-pa…
Browse files Browse the repository at this point in the history
…yment-void

Fix PaymentMethod::StoreCredit#void
  • Loading branch information
gmacdougall authored Nov 28, 2016
2 parents 4aa3763 + 0fa401c commit 6bfefc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/app/models/spree/payment_method/store_credit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def cancel(auth_code)
end
credit(amount, auth_code, { originator: store_credit_event.originator })
elsif store_credit_event.authorization_action?
store_credit.void(auth_code)
void(auth_code)
else
ActiveMerchant::Billing::Response.new(false, '', {}, {})
end
Expand Down
2 changes: 1 addition & 1 deletion core/spec/models/spree/payment_method/store_credit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
store_credit: store_credit) }

it "creates a store credit for the same amount that was captured" do
expect_any_instance_of(Spree::StoreCredit).to receive(:void).with(auth_code)
expect_any_instance_of(Spree::StoreCredit).to receive(:void).with(auth_code, {action_originator: nil})
subject
end
end
Expand Down

0 comments on commit 6bfefc7

Please sign in to comment.