Class: PaymentRecipes::PayPal::REST::Action::CaptureAuthorization
- Inherits:
-
Utils::Action
- Object
- Utils::Action
- PaymentRecipes::PayPal::REST::Action::CaptureAuthorization
- Defined in:
- lib/payment_recipes/paypal/rest/action/capture_authorization.rb
Instance Method Summary collapse
Methods inherited from Utils::Action
#debug, debug, #ensure_presence, #execute, #failure?, #get, #initialize, #make_instance_variables_available, prepare, rules, #set, #store, #stored_variables, #success?, variable
Constructor Details
This class inherits a constructor from PaymentRecipes::Utils::Action
Instance Method Details
#perform ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/payment_recipes/paypal/rest/action/capture_authorization.rb', line 8 def perform if .can_be_captured? currency = .currency total = .total.to_s ..capture({:amount => { :currency => currency, :total => total } }) .reload! .reload_payment! else raise Exception, "Authorization can't be captured" end end |