PurchaseResult Struct

#include <vapp.h>

Public Members

bool ok = false
bool canceled = false
std::string purchaseToken
std::string planId
std::string error

Detailed Description

In-app purchase seam: run the platform store's native purchase flow (Android Google Play; desktop/web install no handler — they bill via Stripe, so this is a safe no-op there). Async like the upload seam: the shell launches the store sheet for productId/planId (attaching accountId, an opaque per-account id the store hashes for fraud signals) and delivers a purchase token back. Only a string crosses the boundary — the server verifies the token, so no billing logic lives in the core.

Member Variable Documentation

bool ok = false

a purchase or plan change completed

bool canceled = false

the user dismissed the store sheet

std::string purchaseToken

the store purchase token (verify server-side)

std::string planId

echoed base-plan id (e.g. "monthly-3")

std::string error

"" on success/cancel; detail otherwise

Appearance
Theme
—