Turn InAppPurchase into an EventEmitter

This commit is contained in:
Cheng Zhao 2018-01-10 16:37:05 +09:00
parent 400bfb3c5a
commit ac6f895f64
8 changed files with 123 additions and 90 deletions

View file

@ -146,9 +146,9 @@ std::string GetReceiptURL() {
}
void PurchaseProduct(const std::string& productID,
const int quantity,
int quantity,
const InAppPurchaseCallback& callback) {
auto iap =
auto* iap =
[[InAppPurchase alloc] initWithCallback:callback quantity:quantity];
[iap purchaseProduct:base::SysUTF8ToNSString(productID)];