I use PFPurchase's buyProduct method call to initiate the in-app purchase process. Although it requires me to enter the test account's email address and the password twice to complete the process.
When I enter the email and the password for the first time, the prompt just disappears and comes back after 2-3 seconds and I have to enter them again.
I use auto-renewing subscriptions with a trial period of 7 days.
My app has one ViewController and I have the below code in the viewDidLoad function.
Below function gets called when I tap on the "BUY" button from the UI:
Any ideas?
When I enter the email and the password for the first time, the prompt just disappears and comes back after 2-3 seconds and I have to enter them again.
I use auto-renewing subscriptions with a trial period of 7 days.
My app has one ViewController and I have the below code in the viewDidLoad function.
Code:
[PFPurchase addObserverForProduct:@"com.tls.1monthsubscription" block:^(SKPaymentTransaction *transaction) {
NSLog(@"Product purchased");
[self checkReceipt];
}];
Below function gets called when I tap on the "BUY" button from the UI:
Code:
-(IBAction)purchaseThirtyDaysSubscriptionBtnAction:(id)sender
{
[SVProgressHUD show];
[PFPurchase buyProduct:@"com.tls.1monthsubscription" block:^(NSError *error) {
if (!error) {
[SVProgressHUD dismiss];
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Purchase Succeeded" message:@"You have purchased subscription successfully!" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alertView show];
} else {
[SVProgressHUD showErrorWithStatus:[error localizedDescription]];
}
}];
}
Any ideas?