Exception: Venice::Receipt::VerificationError
- Inherits:
-
StandardError
- Object
- StandardError
- Venice::Receipt::VerificationError
- Defined in:
- lib/venice/receipt.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#receipt_attributes ⇒ Object
Returns the value of attribute receipt_attributes.
Instance Method Summary collapse
-
#initialize(code, receipt_attributes) ⇒ VerificationError
constructor
A new instance of VerificationError.
- #message ⇒ Object
Constructor Details
#initialize(code, receipt_attributes) ⇒ VerificationError
Returns a new instance of VerificationError.
129 130 131 132 |
# File 'lib/venice/receipt.rb', line 129 def initialize(code, receipt_attributes) @code = Integer(code) @receipt_attributes = receipt_attributes end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
126 127 128 |
# File 'lib/venice/receipt.rb', line 126 def code @code end |
#receipt_attributes ⇒ Object
Returns the value of attribute receipt_attributes.
127 128 129 |
# File 'lib/venice/receipt.rb', line 127 def receipt_attributes @receipt_attributes end |
Instance Method Details
#message ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/venice/receipt.rb', line 134 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 |