Class: PaymentRecipes::PayPal::SOAP::Action::CaptureAuthorization
- Inherits:
-
Utils::Action
- Object
- Utils::Action
- PaymentRecipes::PayPal::SOAP::Action::CaptureAuthorization
show all
- Defined in:
- lib/payment_recipes/paypal/soap/action/capture_authorization.rb
Instance Method Summary
collapse
#debug, debug, #ensure_presence, #execute, #failure?, #get, #initialize, #make_instance_variables_available, prepare, rules, #set, #store, #stored_variables, #success?, variable
Instance Method Details
#capture_id ⇒ Object
97
98
99
|
# File 'lib/payment_recipes/paypal/soap/action/capture_authorization.rb', line 97
def capture_id
response.do_capture_response_details.payment_info.transaction_id
end
|
#do_capture_authorization ⇒ Object
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'lib/payment_recipes/paypal/soap/action/capture_authorization.rb', line 68
def do_capture_authorization
do_capture = api.build_do_capture({
:AuthorizationID => authorization_id,
:Amount => amount,
:CompleteType => "Complete" })
store(:do_capture_response) do
capture_response = api.do_capture(do_capture)
unless capture_response.success?
@error = capture_response.errors
capture_response = nil
end
capture_response
end
end
|
#load_transaction ⇒ Object
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/payment_recipes/paypal/soap/action/capture_authorization.rb', line 46
def perform
prepare_soap_api
do_capture_authorization
if response.success?
load_transaction
end
response
end
|
#prepare_soap_api ⇒ Object
58
59
60
61
62
|
# File 'lib/payment_recipes/paypal/soap/action/capture_authorization.rb', line 58
def prepare_soap_api
store(:api) do
::PaymentRecipes::PayPal::SOAP::Settings.api
end
end
|
#response ⇒ Object
64
65
66
|
# File 'lib/payment_recipes/paypal/soap/action/capture_authorization.rb', line 64
def response
do_capture_response
end
|