MCPcopy
hub / github.com/parse-community/parse-server / validateWithAppStore

Function validateWithAppStore

src/Routers/IAPValidationRouter.js:27–44  ·  view source on GitHub ↗
(url, receipt)

Source from the content-addressed store, hash-verified

25}
26
27function 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
46function getFileForProductIdentifier(productIdentifier, req) {
47 return rest

Callers 1

handleRequestMethod · 0.85

Calls 1

requestFunction · 0.50

Tested by

no test coverage detected