Giter Club home page Giter Club logo

itunes-receipt's Issues

JSON Conversion Missing Data

When converting to JSON, many of the fields are missing, most notably the in app purchases are missing.

The json conversion method was added in b991925.

Was there a specific reason for adding the as_json method? Removing the as_json method seems to resolve the issue.

JSON Conversion is broken

I currently get this error:

"ArgumentError:
wrong number of arguments (1 for 0)"

I'm running on ruby 1.9.3.

`expires_date` field is invalid for auto-renewable subscriptions

When I verify receipts for auto-renewable subscriptions, the value for expires_date is wrong:

receipt_data = "..." # receipt for auto-renewable subscription
receipt = Itunes::Receipt.verify!(receipt_data, true)
receipt.expires_date
# => "1969-12-31 16:00:02.000000000 -08:00" (UTC epoch + 2 seconds?)

I think Receipt#initialize is parsing expires_date as milliseconds, but Apple's validator returns it as three fields (date, date_ms, and date_pst), similar to how it returns purchase_date. Snippet of a raw response from the validator:

{
  "receipt": {
    "in_app": [
      {
        ...,
        "purchase_date": "2015-08-01 11:47:43 Etc/GMT",
        "purchase_date_ms": "1438429663000",
        "purchase_date_pst": "2015-08-01 04:47:43 America/Los_Angeles",
        "expires_date": "2015-09-01 11:47:43 Etc/GMT",
        "expires_date_ms": "1441108063000",
        "expires_date_pst": "2015-09-01 04:47:43 America/Los_Angeles",

It looks like at some point Apple standardized how they return their date fields, but expires_date is being parsed as ms instead of a date string.

Where to set Shared secrent for Auto renewal subscriptions?

This gem is working perfectly for non renewal subscriptions.

For auto renewal subscriptions verification fails. Auto renewal subscription needs shared secret but i don't know where to set My Shared Secret in the code.

Can you please help me....

recipt validations

i have some exceptions since we put it in production. Basically it works i checked with my live app account etc. But for some receipts i have these errors :

 no implicit conversion of Symbol into Integer
 itunes-receipt (1.0.0) lib/itunes/receipt.rb:54:in `[]'

do you have any ideas you want me to send you a sample receipt?

RestClient::SSLCertificateNotVerified Error

I've been getting these errors in production. I've fixed the issue on a custom branch of mine by swapping out RestClient for Faraday.

I, [2018-03-01T15:53:16.455400 #19005] INFO -- : Celluloid 0.17.2 is running in BACKPORTED mode. [ http://git.io/vJf3J ] Loading development environment (Rails 4.2.5) irb(main):001:0> require 'itunes' => false irb(main):002:0> Itunes::Receipt.verify!({}) RestClient::SSLCertificateNotVerified: SSL_connect returned=1 errno=0 state=error: certificate verify failed: from /Users/kaom/.rbenv/versions/2.1.10/lib/ruby/gems/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:445:in rescue in transmit'`

Add support for `cancellation_date` field

It would be great if the receipt object would expose the cancellation_date field for auto-renewable subscriptions!

From the receipt fields docs:

For a transaction that was canceled by Apple customer support, the time and date of the cancellation. Treat a canceled receipt the same as if no purchase had ever been made.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.