Class: Spree::PaymentMethod::Check
Constant Summary
Constants included
from DisplayOn
DisplayOn::DISPLAY
Instance Method Summary
collapse
#auto_capture?, #available_for_order?, #available_for_store?, #complete_payment_session, #complete_payment_setup_session, #confirmation_required?, #create_payment_session, #create_payment_setup_session, #default_name, find_with_destroyed, #method_type, #parse_webhook_event, #payment_icon_name, #payment_profiles_supported?, #payment_session_class, #payment_setup_session_class, #payment_source_class, #provider_class, providers, #public_preferences, #reusable_sources, #session_required?, #setup_session_supported?, #show_in_admin?, #store_credit?, #supports?, #update_payment_session, #webhook_url
Methods included from Metadata
#metadata, #metadata=, #public_metadata=
Instance Method Details
#actions ⇒ Object
3
4
5
|
# File 'app/models/spree/payment_method/check.rb', line 3
def actions
%w{capture void}
end
|
#authorize ⇒ Object
7
8
9
|
# File 'app/models/spree/payment_method/check.rb', line 7
def authorize(*)
simulated_successful_billing_response
end
|
#can_capture?(payment) ⇒ Boolean
Indicates whether its possible to capture the payment
16
17
18
|
# File 'app/models/spree/payment_method/check.rb', line 16
def can_capture?(payment)
['checkout', 'pending'].include?(payment.state)
end
|
#can_void?(payment) ⇒ Boolean
Indicates whether its possible to void the payment.
21
22
23
|
# File 'app/models/spree/payment_method/check.rb', line 21
def can_void?(payment)
payment.state != 'void'
end
|
#cancel ⇒ Object
29
30
31
|
# File 'app/models/spree/payment_method/check.rb', line 29
def cancel(*)
simulated_successful_billing_response
end
|
#capture ⇒ Object
25
26
27
|
# File 'app/models/spree/payment_method/check.rb', line 25
def capture(*)
simulated_successful_billing_response
end
|
#credit ⇒ Object
41
42
43
|
# File 'app/models/spree/payment_method/check.rb', line 41
def credit(*)
simulated_successful_billing_response
end
|
#purchase ⇒ Object
11
12
13
|
# File 'app/models/spree/payment_method/check.rb', line 11
def purchase(*)
simulated_successful_billing_response
end
|
#source_required? ⇒ Boolean
37
38
39
|
# File 'app/models/spree/payment_method/check.rb', line 37
def source_required?
false
end
|
#void ⇒ Object
33
34
35
|
# File 'app/models/spree/payment_method/check.rb', line 33
def void(*)
simulated_successful_billing_response
end
|