Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)onPurchaseCompleted {
- GAITransaction *transaction =
- [GAITransaction transactionWithId:@"0_123456" // (NSString) Transaction ID, should be unique.
- withAffiliation:@"In-App Store"; // (NSString) Affiliation
- transaction.taxMicros = (int64_t)(0.17 * 1000000); // (int64_t) Total tax (in micros)
- transaction.shippingMicros = (int64_t)(0); // (int64_t) Total shipping (in micros)
- transaction.revenueMicros = (int64_t)(2.16 * 1000000); // (int64_t) Total revenue (in micros)
- [transaction addItemWithSKU:@"L_789" // (NSString) Product SKU
- name:@"Level Pack: Space" // (NSString) Product name
- category:@"Game expansions" // (NSString) Product category
- priceMicros:(int64_t)(1.99 * 1000000) // (int64_t) Product price (in micros)
- quantity:1]; // (NSInteger) Product quantity
- [[GAI sharedInstance].defaultTracker sendTransaction:transaction]; // Send the transaction.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement