I had implemented consumable In app purchase with credit system. I used 0.99 (tier1) is my based credit then I am multiplying with quantity. The number of credit is calculating dynamically. So that if the number of credit is more than 10, is not able to purchase.
Below is my sample code.
- (void)buyProduct:(SKProduct *)product titleIdentifier:(NSString*)titleIdent Quantity:(NSInteger)quantity{
[self clearAllNonFinishedTransaction];
NSLog(@"Buying %@... Quantity %i", product.productIdentifier,quantity);
SKMutablePayment * payment = [SKMutablePayment paymentWithProduct:product];
payment.quantity = 13;
[[self paymentQueueObject] addPayment:payment];
}
So is there any way which I can do purchase more than 10 quantity, by using 0.99 (tier1)?
Additional point :
I am selling digital books. The book price is set by the website. For example, if the book price is 13.99, I am calculating 12.99/0.99 will be the number of credits for this example 13 is the credit. Is any other alternative option or methods which I can calculate my number of credits?