cc.fovea.cordova.purchase
Advanced tools
Comparing version 8.0.0 to 8.1.0
@@ -71,3 +71,7 @@ # iOS Configuration | ||
You can omit automatic downloading of hosted content by setting the `disableHostedContent` store flag, for example: | ||
store.disableHostedContent = true; | ||
store.refresh(); | ||
### <a name="non-renewing"></a>Non-Renewing iOS Subscriptions | ||
@@ -74,0 +78,0 @@ |
{ | ||
"name": "cc.fovea.cordova.purchase", | ||
"version": "8.0.0", | ||
"version": "8.1.0", | ||
"description": "Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)", | ||
@@ -42,4 +42,4 @@ "cordova": { | ||
"devDependencies": { | ||
"acorn": "^6.1.1", | ||
"babel-eslint": "^10.0.1", | ||
"cordova": "^6.3.1", | ||
"coveralls": "^3.0.3", | ||
@@ -46,0 +46,0 @@ "eslint": "^5.15.0", |
@@ -99,2 +99,3 @@ declare var store: IapStore.IStore; | ||
autoFinishTransactions: boolean; | ||
disableHostedContent: boolean; | ||
@@ -101,0 +102,0 @@ error(callback: (err: IError) => void): void; |
@@ -164,2 +164,3 @@ /*global storekit */ | ||
autoFinish: store.autoFinishTransactions, | ||
disableHostedContent: store.disableHostedContent, | ||
error: storekitError, | ||
@@ -334,3 +335,3 @@ purchase: storekitPurchased, | ||
//! | ||
function storekitPurchased(transactionId, productId) { | ||
function storekitPurchased(transactionId, productId, originalTransactionId) { | ||
store.ready(function() { | ||
@@ -359,2 +360,5 @@ var product = store.get(productId); | ||
}; | ||
if(originalTransactionId){ | ||
product.transaction.original_transaction_id = originalTransactionId; | ||
} | ||
if (!product.transactions) | ||
@@ -361,0 +365,0 @@ product.transactions = []; |
@@ -101,2 +101,6 @@ /* | ||
if (options.disableHostedContent) { | ||
exec('disableHostedContent', [], noop, noop); | ||
} | ||
var that = this; | ||
@@ -338,3 +342,3 @@ var setupOk = function () { | ||
// In this case, we'll just keep pending updates in a list for later processing. | ||
InAppPurchase.prototype.updatedTransactionCallback = function (state, errorCode, errorText, transactionIdentifier, productId, transactionReceipt) { | ||
InAppPurchase.prototype.updatedTransactionCallback = function (state, errorCode, errorText, transactionIdentifier, productId, transactionReceipt, originalTransactionIdentifier) { | ||
@@ -363,3 +367,3 @@ if (!initialized) { | ||
case "PaymentTransactionStatePurchased": | ||
protectCall(this.options.purchase, 'options.purchase', transactionIdentifier, productId); | ||
protectCall(this.options.purchase, 'options.purchase', transactionIdentifier, productId, originalTransactionIdentifier); | ||
return; | ||
@@ -366,0 +370,0 @@ case "PaymentTransactionStateFailed": |
@@ -19,2 +19,3 @@ | ||
noAutoFinish: true, | ||
disableHostedContent: false, | ||
ready: IAP.onReady, | ||
@@ -21,0 +22,0 @@ purchase: IAP.onPurchase, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
896857
98
15523