New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow payment method to control auto_capture? #2304

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@jhawthorn
Contributor

jhawthorn commented Dec 10, 2012

Some gateways (ex. samurai, eway, stripe) only support purchase, not
auth/capture.

This allows those gateways to override auto_capture? and coexist with other payment methods not using auto_capture. Also eliminates the required configuration for those payment methods.

Allow payment method to control auto_capture?
Some gateways (ex. samurai, eway, stripe) only support purchase, not
auth/capture. This allows those gateways to override auto_capture?, and
coexist with other payment methods not using auto_capture, and also
eliminates the required configuration for those payment methods.
@@ -5,7 +5,7 @@ def process!
if payment_method && payment_method.source_required?
if source
if !processing?
if Spree::Config[:auto_capture]
if payment_method.auto_capture?

This comment has been minimized.

@radar

radar Dec 10, 2012

Member

Given that this is the only place where auto_capture is used as a config setting, shouldn't it also be removed with this patch?

@radar

radar Dec 10, 2012

Member

Given that this is the only place where auto_capture is used as a config setting, shouldn't it also be removed with this patch?

This comment has been minimized.

@jhawthorn

jhawthorn Dec 10, 2012

Contributor

I made the default PaymentMethod.auto_capture? call "Spree::Config[:auto_capture]", so the existing functionality would be unchanged.

@jhawthorn

jhawthorn Dec 10, 2012

Contributor

I made the default PaymentMethod.auto_capture? call "Spree::Config[:auto_capture]", so the existing functionality would be unchanged.

This comment has been minimized.

@radar

radar Dec 10, 2012

Member

Oh, true. My mistake.

On Tue, Dec 11, 2012 at 10:33 AM, John Hawthorn notifications@github.comwrote:

In core/app/models/spree/payment/processing.rb:

@@ -5,7 +5,7 @@ def process!
if payment_method && payment_method.source_required?
if source
if !processing?

  •          if Spree::Config[:auto_capture]
    
  •          if payment_method.auto_capture?
    

I made the default PaymentMethod.auto_capture? call
"Spree::Config[:auto_capture]", so the existing functionality would be
unchanged.


Reply to this email directly or view it on GitHubhttps://github.com/spree/spree/pull/2304/files#r2371798.

@radar

radar Dec 10, 2012

Member

Oh, true. My mistake.

On Tue, Dec 11, 2012 at 10:33 AM, John Hawthorn notifications@github.comwrote:

In core/app/models/spree/payment/processing.rb:

@@ -5,7 +5,7 @@ def process!
if payment_method && payment_method.source_required?
if source
if !processing?

  •          if Spree::Config[:auto_capture]
    
  •          if payment_method.auto_capture?
    

I made the default PaymentMethod.auto_capture? call
"Spree::Config[:auto_capture]", so the existing functionality would be
unchanged.


Reply to this email directly or view it on GitHubhttps://github.com/spree/spree/pull/2304/files#r2371798.

@radar radar closed this in 769c1aa Dec 11, 2012

radar added a commit that referenced this pull request Jan 14, 2013

Allow payment method to control auto_capture?
Some gateways (ex. samurai, eway, stripe) only support purchase, not
auth/capture. This allows those gateways to override auto_capture?, and
coexist with other payment methods not using auto_capture, and also
eliminates the required configuration for those payment methods.

Fixes #2304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment