Advertisement
Guest User

Untitled

a guest
Jul 10th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. - (void)onPurchaseCompleted {
  2. GAITransaction *transaction =
  3. [GAITransaction transactionWithId:@"0_123456" // (NSString) Transaction ID, should be unique.
  4. withAffiliation:@"In-App Store"; // (NSString) Affiliation
  5.  
  6. transaction.taxMicros = (int64_t)(0.17 * 1000000); // (int64_t) Total tax (in micros)
  7. transaction.shippingMicros = (int64_t)(0); // (int64_t) Total shipping (in micros)
  8. transaction.revenueMicros = (int64_t)(2.16 * 1000000); // (int64_t) Total revenue (in micros)
  9.  
  10. [transaction addItemWithSKU:@"L_789" // (NSString) Product SKU
  11. name:@"Level Pack: Space" // (NSString) Product name
  12. category:@"Game expansions" // (NSString) Product category
  13. priceMicros:(int64_t)(1.99 * 1000000) // (int64_t) Product price (in micros)
  14. quantity:1]; // (NSInteger) Product quantity
  15.  
  16. [[GAI sharedInstance].defaultTracker sendTransaction:transaction]; // Send the transaction.
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement