Class: PaygatePk::Providers::PayFast::Webhook

Inherits:
Object
  • Object
show all
Defined in:
lib/paygate_pk/providers/pay_fast/webhook.rb

Overview

Verifies PayFast IPN/notification params (GET to your CHECKOUT_URL) Returns PaygatePk::Contracts::WebhookEvent on success, raises on failure.

Instance Method Summary collapse

Instance Method Details

#verify!(raw_params) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/paygate_pk/providers/pay_fast/webhook.rb', line 9

def verify!(raw_params)
  params = normalize_keys(raw_params)

  validate_required_params(params)
  verify_signature(params)
  build_webhook(params, raw_params)
end