Exception: IAPVerifier::Error::InvalidReceiptData
- Defined in:
- lib/iap_verifier/error.rb
Constant Summary collapse
- MESSAGES =
{ 21000 => "App store could not read", 21002 => "Data was malformed", 21003 => "Receipt not authenticated", 21004 => "Shared secret does not match", 21005 => "Receipt server unavailable", 21006 => "Receipt valid but sub expired", 21007 => "Sandbox receipt sent to Production environment", 21008 => "Production receipt sent to Sandbox environment" }
Instance Method Summary collapse
-
#initialize(code) ⇒ InvalidReceiptData
constructor
A new instance of InvalidReceiptData.
- #message ⇒ Object
Constructor Details
#initialize(code) ⇒ InvalidReceiptData
Returns a new instance of InvalidReceiptData.
43 44 45 |
# File 'lib/iap_verifier/error.rb', line 43 def initialize(code) @code = code end |
Instance Method Details
#message ⇒ Object
47 48 49 50 51 52 |
# File 'lib/iap_verifier/error.rb', line 47 def { error_code: @code, message: MESSAGES.fetch(@code, 'Unknown error code') } end |