This commit is contained in:
Nicolas Bally 2019-06-11 16:26:52 +02:00
parent b3117a2eb5
commit 9ae944bde3
3 changed files with 4 additions and 2 deletions

View File

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

View File

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

View File

@ -44,6 +44,7 @@ Survey::Application.routes.draw do
get :paid_by_paypal get :paid_by_paypal
get :do_paypal_payment get :do_paypal_payment
post :ipn post :ipn
get :ipn
get :thanks get :thanks
end end
end end
@ -56,6 +57,7 @@ Survey::Application.routes.draw do
get :paid get :paid
get :do_paypal_payment get :do_paypal_payment
post :ipn post :ipn
get :ipn
get :thanks get :thanks
end end
end end