diff --git a/Sources/mParticle-Appboy/MPKitAppboy.m b/Sources/mParticle-Appboy/MPKitAppboy.m index a1c7935..4376a94 100644 --- a/Sources/mParticle-Appboy/MPKitAppboy.m +++ b/Sources/mParticle-Appboy/MPKitAppboy.m @@ -467,7 +467,7 @@ - (MPKitExecStatus *)routeCommerceEvent:(MPCommerceEvent *)commerceEvent { } // Strips key/values already being passed to Appboy, plus key/values initialized to default values - keys = @[kMPExpProductSKU, kMPProductCurrency, kMPExpProductUnitPrice, kMPExpProductQuantity, kMPProductAffiliation, kMPExpProductCategory, kMPExpProductName]; + keys = @[kMPExpProductSKU, kMPProductCurrency, kMPExpProductUnitPrice, kMPExpProductQuantity]; [properties removeObjectsForKeys:keys]; [appboyInstance logPurchase:product.sku diff --git a/mParticle_AppboyTests/mParticle_AppboyTests.m b/mParticle_AppboyTests/mParticle_AppboyTests.m index 5e9cbd9..aa37f2f 100644 --- a/mParticle_AppboyTests/mParticle_AppboyTests.m +++ b/mParticle_AppboyTests/mParticle_AppboyTests.m @@ -410,6 +410,7 @@ - (void)testlogPurchaseCommerceEvent { XCTAssertEqualObjects(mockClient, [kit appboyInstance]); MPProduct *product = [[MPProduct alloc] initWithName:@"product1" sku:@"1131331343" quantity:@1 price:@13]; + product.category = @"category1"; MPCommerceEvent *event = [[MPCommerceEvent alloc] initWithAction:MPCommerceEventActionPurchase product:product]; event.customAttributes = @{@"testKey" : @"testCustomAttValue"}; @@ -430,7 +431,9 @@ - (void)testlogPurchaseCommerceEvent { @"Total Amount" : @13.00, @"Total Product Amount" : @"13", @"Tax Amount" : @3, - @"Transaction Id" : @"foo-transaction-id" + @"Transaction Id" : @"foo-transaction-id", + @"Name" : @"product1", + @"Category" : @"category1" }]; MPKitExecStatus *execStatus = [kit logBaseEvent:event];