Payment should be part of Transaction
This follows The SKPayment API, and makes our JS wrappers easier to implement.
This commit is contained in:
parent
635b753ecd
commit
2dd545ebda
5 changed files with 13 additions and 23 deletions
|
@ -40,6 +40,7 @@ struct Converter<in_app_purchase::Transaction> {
|
|||
dict.Set("transactionState", val.transactionState);
|
||||
dict.Set("errorCode", val.errorCode);
|
||||
dict.Set("errorMessage", val.errorMessage);
|
||||
dict.Set("payment", val.payment);
|
||||
return dict.GetHandle();
|
||||
}
|
||||
};
|
||||
|
@ -82,9 +83,8 @@ void InAppPurchase::PurchaseProduct(const std::string& product_id,
|
|||
}
|
||||
|
||||
void InAppPurchase::OnTransactionUpdated(
|
||||
const in_app_purchase::Payment& payment,
|
||||
const in_app_purchase::Transaction& transaction) {
|
||||
Emit("transaction-updated", payment, transaction);
|
||||
Emit("transaction-updated", transaction);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue