Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #38 from minggangw/XWALK_6895
Browse files Browse the repository at this point in the history
[IAP]Throw an error when the order.productId is undefined
  • Loading branch information
Halton Huo committed May 19, 2016
2 parents 8673aab + a4615f0 commit 43b0556
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iap/iap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 43b0556

Please sign in to comment.