createSubscriptionPlan method
Future<BasePurchaseModel>
createSubscriptionPlan({
- required PurchaseDetails purchasedProduct,
- String? currencySymbol,
- String? price,
override
Implementation
@override
Future<BasePurchaseModel> createSubscriptionPlan(
{required PurchaseDetails purchasedProduct,
String? currencySymbol,
String? price}) async {
final String packageName = await DeviceInfoHelper.packageName;
if (DeviceInfoHelper.isIos) {
return IosPurchaseModel(
currencySymbol: currencySymbol,
price: price,
receipt: purchasedProduct.verificationData.serverVerificationData);
}
return AndroidPurchaseModel(
currencySymbol: currencySymbol,
price: price,
data: AndroidData(
packageName: packageName,
subscriptionId: purchasedProduct.productID,
token: purchasedProduct.verificationData.serverVerificationData,
),
);
}