diff --git a/iap/iap.js b/iap/iap.js index 10c4dff..a5c8fc6 100644 --- a/iap/iap.js +++ b/iap/iap.js @@ -64,6 +64,9 @@ exports.purchase = function(order) { if (!g_initialized) { throw new DOMError("InvalidStateError"); } + if (typeof(order.productId) === "undefined") { + throw new DOMError("InvalidAccessError"); + } var requestId = createAsyncRequest(resolve, reject); sendAsycRequest("purchase", requestId, order); });