Purchase manually
Getting all products
Purchasely.allProducts(success: { (products) in
// Returns an array of products and its available plans
}, failure: { (error) in
// Display error
})[Purchasely allProductsWithSuccess:^(NSArray<PLYProduct *> * _Nonnull products) {
NSLog(@"%ld products available", products.count);
}
failure:^(NSError * _Nullable error) {
NSLog(@"Error %@", error);
}];Purchasely.allProducts(
onSuccess = { products ->
// Returns an array of products and its available plans
},
onError = {
// display error
}
)Purchasely.allProducts(new ProductsListener() {
@Override
public void onSuccess(@NonNull List<PLYProduct> list) {
// Returns an array of products and its available plans
}
@Override
public void onFailure(@NonNull Throwable throwable) {
// Display error
}
});Getting a product
Purchasely.product(with: "PRODUCT_VENDOR_ID", success: { (product) in
// Returns a product and its available plans
}, failure: { (error) in
// Display error
})[Purchasely productWith:@"PRODUCT_VENDOR_ID" success:^(PLYProduct * _Nonnull) {
// Display the product and its plans
} failure:^(NSError * _Nullable) {
// Display error
}];Purchasely.product("PRODUCT_VENDOR_ID",
onSuccess = { product ->
// Returns a product and its available plans
},
onError = { throwable ->
//display an error
}
)Purchasely.product("PRODUCT_VENDOR_ID", new ProductListener() {
@Override
public void onSuccess(@Nullable PLYProduct product) {
// Returns a product and its available plans
}
@Override
public void onFailure(@NotNull Throwable throwable) {
//display an error
}
});Getting a plan
Purchasing a plan
Restoring all products
Getting user subscriptions
Last updated