in_app_purchase.h 906 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2017 Amaplex Software, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ATOM_BROWSER_MAC_IN_APP_PURCHASE_H_
  5. #define ATOM_BROWSER_MAC_IN_APP_PURCHASE_H_
  6. #include <string>
  7. #include "base/callback.h"
  8. namespace in_app_purchase {
  9. // --------------------------- Typedefs ---------------------------
  10. typedef base::Callback<void(bool isProductValid)> InAppPurchaseCallback;
  11. // --------------------------- Functions ---------------------------
  12. bool CanMakePayments(void);
  13. void FinishAllTransactions(void);
  14. void FinishTransactionByDate(const std::string& date);
  15. std::string GetReceiptURL(void);
  16. void PurchaseProduct(const std::string& productID,
  17. int quantity,
  18. const InAppPurchaseCallback& callback);
  19. } // namespace in_app_purchase
  20. #endif // ATOM_BROWSER_MAC_IN_APP_PURCHASE_H_