src/js/platforms/ios-adapter.js
// Use it to force a validation of the appStoreReceipt.
Use it to force a validation of the appStoreReceipt.
Use it to force a validation of the appStoreReceipt .
function storekitSetAppProductFromReceipt(data) {
    if (data) {
        var p = data.bundleIdentifier ? store.get(data.bundleIdentifier) : null;
        if (!p) {
            p = new store.Product({
                id:    data.bundleIdentifier || "_",
                alias: store.APPLICATION,
                type:  store.APPLICATION,
            });
            store.register(p);
            p.title = 'Application Bundle';
        }
        p.transaction = {
            type: 'ios-appstore',
            appStoreReceipt: data.appStoreReceipt,
            signature: data.signature
        };
        p.version = data.bundleShortVersion;
        p.trigger("loaded");
        if (p.state !== store.OWNED && p.state !== store.APPROVED) {
            p.set('state', store.APPROVED);
        }
        return p;
    }
}
function storekitSetAppProductFromReceipt ( data ) { if ( data ) { var p = data . bundleIdentifier ? store . get ( data . bundleIdentifier ) : null ; if ( ! p ) { p = new store . Product ( { id : data . bundleIdentifier || "_" , alias : store . APPLICATION , type : store . APPLICATION , } ) ; store . register ( p ) ; p . title = 'Application Bundle' ; } p . transaction = { type : 'ios-appstore' , appStoreReceipt : data . appStoreReceipt , signature : data . signature } ; p . version = data . bundleShortVersion ; p . trigger ( "loaded" ) ; if ( p . state !== store . OWNED && p . state !== store . APPROVED ) { p . set ( 'state' , store . APPROVED ) ; } return p ; } }
Use it to force a validation of the appStoreReceipt.
Use it to force a validation of the appStoreReceipt .