Class: CatarsePaypalExpress::ContributionActions

Inherits:
Object
  • Object
show all
Defined in:
lib/catarse_paypal_express/contribution_actions.rb

Instance Method Summary collapse

Constructor Details

#initialize(contribution) ⇒ ContributionActions

Returns a new instance of ContributionActions.



4
5
6
# File 'lib/catarse_paypal_express/contribution_actions.rb', line 4

def initialize contribution
  @contribution = contribution
end

Instance Method Details

#refundObject



8
9
10
11
# File 'lib/catarse_paypal_express/contribution_actions.rb', line 8

def refund
  refund_request = gateway.refund(nil, @contribution.payment_id)
  refund_request.success?
end