From 82e3016a2682c3885afbfd708270bb0c8e49c8ec Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Thu, 7 Jun 2018 15:56:38 +1000 Subject: [PATCH] Add comment to StripeGateway wrapper methods indicating that they are named by Spree --- app/models/spree/gateway/stripe_connect.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/spree/gateway/stripe_connect.rb b/app/models/spree/gateway/stripe_connect.rb index e9e70671b2..2f192eb655 100644 --- a/app/models/spree/gateway/stripe_connect.rb +++ b/app/models/spree/gateway/stripe_connect.rb @@ -31,6 +31,7 @@ module Spree StripeAccount.find_by_enterprise_id(preferred_enterprise_id).andand.stripe_user_id end + # NOTE: the name of this method is determined by Spree::Payment::Processing def purchase(money, creditcard, gateway_options) provider.purchase(*options_for_purchase_or_auth(money, creditcard, gateway_options)) rescue Stripe::StripeError => e @@ -38,11 +39,13 @@ module Spree failed_activemerchant_billing_response(e.message) end + # NOTE: the name of this method is determined by Spree::Payment::Processing def void(response_code, _creditcard, gateway_options) gateway_options[:stripe_account] = stripe_account_id provider.void(response_code, gateway_options) end + # NOTE: the name of this method is determined by Spree::Payment::Processing def credit(money, _creditcard, response_code, gateway_options) gateway_options[:stripe_account] = stripe_account_id provider.refund(money, response_code, gateway_options)