youknowone / itunes-iap

Apple iTunes In-app purchase verification tool
http://itunes-iap.readthedocs.io
Other
136 stars 50 forks source link

Failback to sandbox only on specific status #26

Closed kmitrovic closed 8 years ago

kmitrovic commented 8 years ago

According to iTunes documentation, their production API will return specific status in case when we are sending transaction raw data from their sandbox's environment: https://developer.apple.com/library/ios/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-RECEIPTURL

Hence, we do not need to send any other failed transactions (those which returned status other than 21007) to sandbox in case when both production and sandbox environments are used.

Note: while testing on my machine (excluding py2.6, 3.3 and pypi) I got FAIL for py27 in test_receipt, line assert isinstance(in_app0.original_purchase_date_ms, int) - 1432002585000L is not an int (if applicable, I'm using 32bit OS).

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.03%) to 89.097% when pulling 4e9b809157e6aed3d77b22fa59e7e9a57064ffbc on kmitrovic:master into 7033d8d33dd579412a5cc52f8a05aa2b088b2e08 on youknowone:master.

codecov-io commented 8 years ago

Current coverage is 89.10%

Merging #26 into master will increase coverage by +0.03%

@@             master        #26   diff @@
==========================================
  Files             8          8          
  Lines           320        321     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            285        286     +1   
  Misses           35         35          
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by 7033d8d...4e9b809

youknowone commented 8 years ago

Travis will test it when you make a PR :) I think this is an important improvement of the reviewing behavior. But for the detail, I made a comment about it.

Thanks for a nice patch.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.03%) to 89.097% when pulling 05a38faa4ff28b45c41caa9bec4bda76e6b0add1 on kmitrovic:master into 7033d8d33dd579412a5cc52f8a05aa2b088b2e08 on youknowone:master.

youknowone commented 8 years ago

😄