Exception: Monza::VerificationResponse::VerificationError
- Inherits:
-
StandardError
- Object
- StandardError
- Monza::VerificationResponse::VerificationError
- Defined in:
- lib/monza/verification_response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code) ⇒ VerificationError
constructor
A new instance of VerificationError.
- #message ⇒ Object
Constructor Details
#initialize(code) ⇒ VerificationError
Returns a new instance of VerificationError.
71 72 73 |
# File 'lib/monza/verification_response.rb', line 71 def initialize(code) @code = Integer(code) end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
69 70 71 |
# File 'lib/monza/verification_response.rb', line 69 def code @code end |
Instance Method Details
#message ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/monza/verification_response.rb', line 75 def case @code when 21000 "The App Store could not read the JSON object you provided." when 21002 "The data in the receipt-data property was malformed." when 21003 "The receipt could not be authenticated." when 21004 "The shared secret you provided does not match the shared secret on file for your account." when 21005 "The receipt server is not currently available." when 21006 "This receipt is valid but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response." when 21007 "This receipt is a sandbox receipt, but it was sent to the production service for verification." when 21008 "This receipt is a production receipt, but it was sent to the sandbox service for verification." else "Unknown Error: #{@code}" end end |