1

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?

mmvsbg
  • 3,570
  • 17
  • 52
  • 73
Ramesh R C
  • 644
  • 7
  • 17
  • I think you will need to make additional in-app products with higher "credit" values and a higher price tier – Paulw11 Oct 07 '14 at 08:48
  • if i use higher price tier, how do i calculate number of credits. I am selling digital books. the book price will setting from website. For example if the book price is 13.99, i am calculating 13.99/0.99 will be the number of credits for this example 14 credit. – Ramesh R C Oct 07 '14 at 09:41
  • You need to know how many credits each product code is worth. – Paulw11 Oct 07 '14 at 09:42
  • Yes, if it more than 10. How should i handle? – Ramesh R C Oct 07 '14 at 09:49
  • Say you have 3 in-app purchase product ids, "1Credit" "10Credit" and "50Credit". If the user purchases 3x "1Credit" and 2x "10Credit" then the total purchase is 23 – Paulw11 Oct 07 '14 at 09:51
  • So the total 23 will take place in single transaction or multiple transaction?. I want to do by single transaction. is it possible ? – Ramesh R C Oct 07 '14 at 11:25
  • They would need to be multiple SKPayment objects as you can only have a single product in the payment. You can hide this complexity from the user though – Paulw11 Oct 07 '14 at 11:48
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/62603/discussion-between-ramesh-r-c-and-paulw11). – Ramesh R C Oct 07 '14 at 13:39
  • @RameshRC could you find any solution to your question? I am facing similar problem. I want to allow my customers to purchase more than 10 quantity of same product. – Dhairya Vora Jun 01 '15 at 11:29

0 Answers0