-
Notifications
You must be signed in to change notification settings - Fork 2
chore: Update dependency cordova-plugin-purchase to v13 #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/cordova-plugin-purchase-13.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fddc88f to
e9ce117
Compare
4f9daaa to
6e147e3
Compare
b553e78 to
bb4c92c
Compare
3919214 to
b20be58
Compare
6f6b34c to
593b6cd
Compare
a6064a0 to
913ddc8
Compare
913ddc8 to
5334cc3
Compare
5334cc3 to
865bf7a
Compare
865bf7a to
6fd055a
Compare
6fd055a to
4b863a7
Compare
d368b8b to
3a3933b
Compare
a8cac43 to
ae97dce
Compare
621015e to
b567fa0
Compare
b567fa0 to
3ee0829
Compare
d09574d to
d1ab6d0
Compare
0d4aa12 to
120d478
Compare
59ab3ff to
ad08384
Compare
ad08384 to
e8b68db
Compare
e8b68db to
2174171
Compare
2174171 to
ba8843e
Compare
ba8843e to
b39741c
Compare
b39741c to
7b4d1a3
Compare
967226f to
fa34d62
Compare
f068c48 to
1de0651
Compare
1de0651 to
1fece8e
Compare
1fece8e to
a945bd7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
11.0.0->13.12.1Release Notes
j3k0/cordova-plugin-purchase (cordova-plugin-purchase)
v13.12.1Compare Source
(googleplay) Fix #1434 - validProducts.find is not a product
Some users had this occasional error:
This happened when another call to the native side was made before the list of products was returned (race condition kind of bug). It's fixed in that release.
v13.12.0Compare Source
(googleplay) Upgrade to Google Play Billing library 7.1.1
https://developer.android.com/google/play/billing/release-notes
(all) Fix issue with large number of transactions
In particular, when calling "restorePurchases" in Apple and the user has more than 100 transactions.
5e2ad5bDelay processing of updated receipts71a071cDo not retrigger "approved" for a given transaction until a minute has elapsed(appstore) Fix issue with event handling when autoFinish is set
Issue #1526, approved never fires after initiating the purchase when autoFinish was set.
(all) Fix receipt without a transaction
Issue #1526
Minor changes
Logs and documentation
v13.11.1Compare Source
Fix running from browser with Capacitor
Add
Utils.platformId()helper function to get rid of an error when running a Capacitor app in a browser.Ref issue #1566
v13.11.0Compare Source
Upgrade to Google Play Billing library 7.0.0
It's a backward compatible update, main visible change is the ProrationMode being renamed ReplacementMode (but the plugin kept the old enum and fields for compatibility).
v13.10.4Compare Source
Fix build issue on android
Java compiler started complaining about an implicit parameter. This patch fixes it.
Ref issue #1564
v13.10.3Compare Source
Fix issue when a callback is null or undefined
Ref issue #1557
v13.10.1Compare Source
Fix store.initialize() when passed a single value
store.initialize()was supposed to work when passed a single value instead of an array. It turns out there was a regression, fixed with this release.Add store.when().initiated(transaction)
Allows monitoring
INITIATED(new) transactions.v13.10.0Compare Source
(googleplay) Add "isConsumed" to consumed transactions
Local Google Play transaction now contain
isConsumed, which is the same asisAcknowledged, but only set for consumable products.Make it easier to debug callback calls
It's now possible to add a name to callbacks registered with "store.when()"
When callbacks are triggered, the reason is logged to the console.
Prevent instanciating CdvPurchase.store twice
So when ionic packages the plugin with the app code, no double instantiations of the plugin is performed.
v13.9.0Compare Source
(appstore) store.restorePurchases() return potential errors
The return value for
store.restorePurchases()has been changed fromPromise<void>toPromise<IError|undefined>.You can now inspect the value returned to figure out if processing complete with or without errors.
(appstore) Fix forceReceiptReload
In certain conditions (calls to
orderandrestorePurchases), the AppStore adapter wants to force a refresh of the application receipt. This fix prevents it from returning the version cached in memory.v13.8.6Compare Source
Add CdvPurchase.Utils.platformName()
Convert
CdvPurchase.Platformenum values to a more user friendly version.Usage:
Increase expiry monitor's grace period on Google Play
The 10 seconds wait before refreshing an expired subscription on Google Play wasn't enough: increased to 30 seconds.
Ref #1468
v13.8.5Compare Source
Fixes for Apple AppStore's introductory periods and
subscription renewals.
Load products and receipts in parallel on Apple
This solves the issue with processing the eligibility of
introductory periods.
Increase grace period for Apple subscription before refresh
After observing that Apple sometime needs more than a
minute before the API returns the subscription renewal
transaction, we increased the local grace period (time
before refresh) to 90 seconds.
v13.8.4Compare Source
Trim product titles on Google Play
Google Play returns the app name in parenthesis in product titles. The plugin
now automatically trims it from the app name.
This behavior can be disabled by setting:
Automatically re-validate just-expired subscriptions
The plugin will now monitor active subscripion purchases (as returned by a
receipt validation service) and re-validate the receipt automatically when the
subscription expires or renews.
You can customize the expiry monitor (which should rarely be needed):
Add expiry date to Test Adapter's subscription
The expiry date was missing from the test product:
v13.8.3Compare Source
Fix npm package.
v13.8.2Compare Source
store.applicationUsername can return
undefinedIf no user is logged in, you
applicationUsernamefunction can returnundefined.
Add "productId" and "platform" to Error objects
All errors now include the "platform" and "productId" field (when applicable),
to get more context.
v13.8.0Compare Source
Upgrade to Google Play Billing library 5.2.1
Adds access to offer and base plan identifiers.
Handle validator answer with code
VALIDATOR_SUBSCRIPTION_EXPIREDFor backward compatibility, the validator also support responses with a
6778003error code (expired) when the validated transaction is expired.
Fix: AppStore adapter should only return a localReceipt on iOS
A dummy appstore receipt was listed on other platforms, this is fixed.
Prevent various issues
Prevent double calls to approved callbacks
Make sure
.approved()is only called once during a small time frame.Skip quick successive calls to store.update()
The update will be performed only if
store.update()orstore.initialize()was called less than
store.minTimeBetweenUpdatesmilliseconds.This make it safer to always call
store.update()when entering the app'sStore screen.
Block double callback registrations
Throw an error when attempting the re-register an existing callback for a given
event handler. This is indicative of initialization code being run more than
once.
v13.7.0Compare Source
Fix AppStore introctory prices
Fix a regression with introctory prices on iOS. Unclear when this happened,
according to Apple documentation, the "discounts" array should contain the
introctory prices, but it turns out it does not anymore.
Set ES6 as minimal javascript version
Down from ES2015, for broader compatibility.
Ensure verify() resolves even if there's no validator
Some user do not specify a receipt validator but want to call
"transaction.verify()" (for example app building frameworks).
This changes makes sure the behavior gets back like it used to be in earlier
versions of the plugin.
v13.6.0Compare Source
Add store.when().receiptsReady(cb)
The "receiptsReady" event is triggered only once, as soon as all platforms are
done loading the receipts from the SDK.
It can be used by applications that do not rely on receipt validation, in order
to wait for the list of purchases reported by the native SDK to have been
processed. For example, before running some code that check products ownership
statuses at startup.
If the receipts have already been loaded before you setup this event handler,
it will be called immediately.
Users using a receipt validation server should rely on receiptsVerified()
instead (see below).
Add store.when().receiptsVerified(cb)
Similarly to "receiptsReady", "receiptsVerified" is triggered only once: after
all platforms have loaded their receipts and those have been verified by the
receipt validation server.
It can be used by applications that DO rely on receipt validation, in order to
wait for all receipts to have been processed by the receipt validation service.
A good use case is to encapsulate startup code that check products ownership
status.
If the receipts have already been verified before you setup this event handler,
it will be called immediately.
Add store.when().pending(cb)
This event handler can be notified when a transaction enters the "PENDING"
state, which happens when a user has "Ask to Buy" enabled, or in country where
cash payment is an option.
Remove autogrouping of products
Starting at version 13.4.0, products were automatically added to the "default"
group. This created more issues than it solved, because it let the plugin
automatically try to replace potentially unrelated products.
People willing to rely on automatic subscription replacement on Android should
explicitely set those product's
groupproperty when registering them. Orshould use the
oldPurchaseTokenproperty when making an order.Examples:
v13.5.0Compare Source
By default, the plugin will now setup a 20 seconds timeout for receipt validation requests.
Receipt validation timeout can be detected using the following code:
The value for timeout can be customized by specifying the validator this way:
v13.4.3Compare Source
Let the app know the HTTP status for a failed receipt validation call, in "response.payload.status".
v13.4.2Compare Source
Attempt to fix issue #1406 on iOS, with Ionic v6:
applicationUsernameisn't attached to purchase, it seems like this is due to strings passed as a subclass of NSString on this platform.v13.4.0Compare Source
Products are now part of the
"default"group when none is provided, as per the documentation. This is used on Google Play to automatically replace existing subscription by the newly ordered one.This update can break your app if you have multiple independent subscription products on Google Play, as purchasing a subscription product will now cancel any existing one by default.
Use the
groupproperty instore.registerto force legacy subscription products to be part of different groups.v13.3.11Compare Source
v13.3.10Compare Source
v13.3.9Compare Source
v13.3.8Compare Source
v13.3.7Compare Source
v13.3.6Compare Source
v13.3.5Compare Source
v13.3.4Compare Source
v13.3.3Compare Source
offer.canPurchasewill be false if the platform reports that it doesn't support the "order" functionality.When you check if the offer can be purchased, the plugin will now use the value from
canMakePurchases(for Apple AppStore).If none of the offers can be purchased, you can choose to hide the whole store.
There are 2 reasons why an offer cannot be purchased:
product.owned)If you really want to access the low-level value of
canMakePurchasesyou can do it like so:Ref #1378
v13.3.2Compare Source
You can order a discount offer by providing additional data to "offer.order()" like so:
Check Apple documentation about the meaning of those fields and how to fill them. https://developer.apple.com/documentation/storekit/in-app\_purchase/original\_api\_for\_in-app\_purchase/subscriptions\_and\_offers/setting\_up\_promotional\_offers?language=objc
You can check this old example server here: https://github.com/j3k0/nodejs-suboffer-signature-server
v13.3.1Compare Source
Wait for the transaction to be purchased or the purchase cancelled before resolving.
Example usage:
v13.3.0Compare Source
Add the AppStore
autoFinishoptionUse this if the transaction queue is filled with unwanted transactions (in development).
It's safe to keep this option to "true" when using a receipt validation server and you only sell subscriptions
Example:
Optimize AppStore receipt loaded multiple times in parallel
When the Apple
appStoreReceiptis loaded from multiple source, it resulted in a lot of duplicate calls. 13.3.0 optimizes this use case.Add transactionId and purchaseId to VerifiedPurchase
It's just a TypeScript definition since the plugin doesn't do much with it, but it has been requested by a few users.
v13.2.1Compare Source
v13.2.0Compare Source
Adding store.when().unverified()
unverifiedwill be called when receipt validation failed.Fixing
Product.pricingIssue #1368 fixed:
product.pricingwas alwaysundefined.v13.1.6Compare Source
Bug hasn't been reproduced, but the fix should handle the error case that happened to this user (based on the provided logs).
v13.1.5Compare Source
51400abAdding in-progress transaction to a pseudo receiptc0e47b3Reloading receipt from native side before receipt validation5a8542bImproved error reporting7a80a6dDo not call "finished" for failed transactions348431eReport success/failure of purchasee53017cFix crash when logged out of iCloud (#1354)v13.1.4Compare Source
b692e21Don't error if finishing already finished transaction49c0508Force receipt refresh after order() and restorePurchases()v13.1.3Compare Source
Fixing some receipt validation use cases on Apple devices.
9cfce2dLoad missing iOS appStoreReceipt when validation call is requested2569147Update validator functions to include the receiptsf03a751Refresh appStoreReceipt if empty at validation stagev13.1.2Compare Source
v13.1.1Compare Source
v13.0.3Compare Source
v13.0.2Compare Source
v13.0.1Compare Source
v13.0.0Compare Source
This is a full rewrite of the API, updated to allow:
All JavaScript code has being rewritten in TypeScript, typings are now 100% complete and accurate.
If you're upgrading from an earlier version, check the migration guide.
The native code is built using version 12 as starting point, so all features from version 12 are available as well.
Braintree
This version introduces support for Braintree as a payment processor, it requires an additional plugin to add the libraries to your project: https://github.com/j3k0/cordova-plugin-purchase-braintree
The Braintree integration supports payment with 3DSecure and Apple Pay.
Windows Store
Support for payments on Windows Store has been dropped. It will be back in a later version.
Overview
The new API separates the different concepts with their own first-level entities:
Products / Offers will contain the definition of what's available to the user to purchase.
Receipts / Transactions will contain details about what the user has purchased.
In the new API, it is possible to initiate transactions not necessarily linked with a product (using payment processors like Braintree).
It defines a generic Adapter interface, implemented by the various payment platforms. The core of the plugin controls and monitors the different active adapters and expose the unified API. Previously, we basically had an iOS implementation of the unified API (using StoreKit), an android implementation, etc... Now, many adapters can coexist in peace.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.