Compare commits

...

2 Commits

Author SHA1 Message Date
Nicolas Bally
72dd6c7738 suite 2019-06-11 16:45:33 +02:00
Nicolas Bally
b860d3cbbb suite 2019-06-11 16:28:56 +02:00
3 changed files with 8 additions and 1 deletions

View File

@ -226,7 +226,7 @@ class Public::JoinsController < ApplicationController
@api = PayPal::SDK::Merchant.new
if @api.ipn_valid?(request.raw_post) # return true or false
@sheet = Renew.find_by_token(params[:custom].to_s)
@sheet = Sheet.find_by_token(params[:custom].to_s)
if params[:payment_status] == "Completed"

View File

@ -34,6 +34,9 @@ class Renew < ActiveRecord::Base
end
end
true
end
YEAR = 2019
@ -49,6 +52,7 @@ class Renew < ActiveRecord::Base
self.return_done = true
self.save
else
puts sheet_year.errors.messages
false
end

View File

@ -18,6 +18,7 @@ class SheetYear < ActiveRecord::Base
before_validation do
self.gift_year = false if !self.gift_year
true
end
@ -39,6 +40,8 @@ class SheetYear < ActiveRecord::Base
end
true