(url, receipt)
| 25 | } |
| 26 | |
| 27 | function validateWithAppStore(url, receipt) { |
| 28 | return request({ |
| 29 | url: url, |
| 30 | method: 'POST', |
| 31 | body: { 'receipt-data': receipt }, |
| 32 | headers: { |
| 33 | 'Content-Type': 'application/json', |
| 34 | }, |
| 35 | }).then(httpResponse => { |
| 36 | const body = httpResponse.data; |
| 37 | if (body && body.status === 0) { |
| 38 | // No need to pass anything, status is OK |
| 39 | return; |
| 40 | } |
| 41 | // receipt is from test and should go to test |
| 42 | throw body; |
| 43 | }); |
| 44 | } |
| 45 | |
| 46 | function getFileForProductIdentifier(productIdentifier, req) { |
| 47 | return rest |
no test coverage detected