in_app_purchase.h 906 B

12345678910111213141516171819202122232425262728293031323334
  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 SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_
  5. #define SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_
  6. #include <string>
  7. #include "base/callback.h"
  8. namespace in_app_purchase {
  9. // --------------------------- Typedefs ---------------------------
  10. typedef base::OnceCallback<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. InAppPurchaseCallback callback);
  19. } // namespace in_app_purchase
  20. #endif // SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_