Class: ActivePayment::PaypalAdaptivePaymentCallbackController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ActivePayment::PaypalAdaptivePaymentCallbackController
- Defined in:
- app/controllers/active_payment/paypal_adaptive_payment_callback_controller.rb
Instance Method Summary collapse
Instance Method Details
#cancel ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/controllers/active_payment/paypal_adaptive_payment_callback_controller.rb', line 10 def cancel ActivePayment::Gateway.cancel_purchase_from_request( gateway: 'paypal_adaptive_payment', request: request) flash[:error] = 'Your transaction has been canceled' redirect_to '/' end |
#ipn ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/controllers/active_payment/paypal_adaptive_payment_callback_controller.rb', line 18 def ipn ActivePayment::Gateway.verify_purchase_from_request( gateway: 'paypal_adaptive_payment', request: request, data: request.raw_post) head :ok end |
#success ⇒ Object
5 6 7 8 |
# File 'app/controllers/active_payment/paypal_adaptive_payment_callback_controller.rb', line 5 def success flash[:success] = 'Thank you!' redirect_to '/' end |