Posts

Post not yet marked as solved
0 Replies
861 Views
I'm a new Swift developer. I'm using Xcode 10.1 and Swift 4.2.I'm developing an app that shows the user his $USD balance and allows him to use that balance for various purposes within the app. The user can add $USD to the balance - ideally through an in-app purchase. The balance is maintained on my server and decremented as the user uses the app in ways that spend that balance.I have a few questions: 1) should I use a consumable IAP product type for purchases of a $5 increment or $10 increment to the balance? Do I have to notify Apple when it is consumed? It will be consumed immediately as I add that amount to the balance on my server for use in the app.2) does Apple take 30% of the amount added (for a $5 increment, Apple takes $1.50)? Is that just for the first year?3) since the balance can be used immediately, does Apple have fraud filters to prevent someone from using stolen credit card info to make a purchase and then using it immediately for services that actually have a cost to provide? I have been burned with online sales, even though we had professional fraud filters. We still had to eat the chargebacks. That's why I would be willing to pay Apple a precentage to prevent the fraud.4) if I add paypal to the app as well, does Apple take a percentage of purchases made through paypal?I'm sorry for the very simple, perhaps naive questions. But I really need to know this information and the Apple documentation is not that specific. Thank you.
Posted Last updated
.
Post marked as solved
2 Replies
1.7k Views
I am trying to set up a Google Cloud Function (GCF) to handle Subscription Notifications from Apple. I am familiar with GCF, but not familiar with the Nodejs methods of handling the data Apple sends with the notification. I am receiving the Apple notification, but only a "chunk" of it. Here's my code (using express and body-parser frameworks):exports.iosNotification = functions.https.onRequest((req, res) => { console.log("We are receiving a request from Apple."); app.use(bodyParser.json()); console.log(req.body);Should I be "listening" to a port? If so, which one? Do I need to concatenate "chunks"? As you can see, I've read about this, but I'm a little lost here.This is the output I'm getting (which is part of the notification Apple says it is sending):{ latest_receipt: 'ewoJInNpZ25hdHVyZSIgPSAiQTNVM0FjaDJpbXRPMG53cEtrQW9But I don't get `notification_type` or any of the other parts of the JSON file.
Posted Last updated
.