[Purchasely setPaywallActionsInterceptor:^(enum PLYPresentationAction action, PLYPresentationActionParameters *parameters, PLYPresentationInfo *presentationInfos, void (^ proceed)(BOOL)) {
// Intercept the tap on purchase to display the terms and condition
case PLYPresentationActionPurchase:{
// Grab the plan to purchase
NSString *appleProductId = parameters.plan.appleProductId;
if (appleProductId == nil) {
[MyPurchaseSystem purchase:appleProductId completion:^(BOOL success, NSError *Error) {
// We handle the purchase so we tell Purchasely not to handle it
[presentationInfos.controller dismissViewControllerAnimated:YES completion:nil];