Payment should be part of Transaction

This follows The SKPayment API, and makes our JS wrappers easier to
implement.
This commit is contained in:
Cheng Zhao 2018-01-10 17:06:27 +09:00
parent 635b753ecd
commit 2dd545ebda
5 changed files with 13 additions and 23 deletions

View file

@ -32,6 +32,7 @@ struct Transaction {
int errorCode = 0;
std::string errorMessage = "";
std::string transactionState = "";
Payment payment;
};
// --------------------------- Classes ---------------------------
@ -41,8 +42,7 @@ class TransactionObserver {
TransactionObserver();
virtual ~TransactionObserver();
virtual void OnTransactionUpdated(const Payment& payment,
const Transaction& transaction) = 0;
virtual void OnTransactionUpdated(const Transaction& transaction) = 0;
private:
InAppTransactionObserver* obeserver_;