in-app-purchase icon indicating copy to clipboard operation
in-app-purchase copied to clipboard

paymentState not found in subscription validation response

Open ManalLiaquat opened this issue 4 years ago • 1 comments

Hello! I want paymentState in validation response for auto-renewable subscription, to check that subscription is in a trial period or not. Can I get this object in response as in the official docs.

My Code:

iap.config({
		verbose: true,
		test: true,
		appleExcludeOldTransactions: true, // if you want to exclude old transaction, set this to true. Default is false
		applePassword: ApplePass,
		googlePublicKeyStrLive: GooglePublicKey,
	});

iap.setup((error)=>{
                if (error) {
			console.log("SETEP_ERROR ========>", error);
			return;
		}
                iap.validate(service, receipt, (vError, validationResponse)=>{
                    if(iap.isValidated(validationResponse)){
                             const availablePurcheses = iap.getPurchaseData(validationResponse, {
				ignoreCanceled: false,
				ignoreExpired: false
			});
                     }
                });
});

Similar Issues don't help me! #94 #124

ManalLiaquat avatar Apr 07 '20 12:04 ManalLiaquat

same here any news on this? @ManalLiaquat ?

prundianudaniel avatar Jul 08 '20 10:07 prundianudaniel