Class: RubyNative::IAP::AppleWebhookProcessor
- Inherits:
-
Object
- Object
- RubyNative::IAP::AppleWebhookProcessor
- Includes:
- Decodable, Normalizable, Verifiable
- Defined in:
- lib/ruby_native/iap/apple_webhook_processor.rb
Constant Summary
Constants included from Normalizable
Normalizable::STATUS_MAPPING, Normalizable::TYPE_MAPPING
Constants included from Verifiable
Verifiable::APPLE_ROOT_CERT_PATH
Instance Method Summary collapse
Instance Method Details
#process(signed_payload) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ruby_native/iap/apple_webhook_processor.rb', line 8 def process(signed_payload) notification = parse_notification(signed_payload) intent = PurchaseIntent.find_by(uuid: notification.app_account_token) event = build_event(notification, intent) intent&.update!(status: :completed) if intent&.pending? RubyNative.fire_subscription_callbacks(event) event end |