-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix purchaseSubscriptionOption not accepting oldProductIdentifier (#764)
As reported in #763, we were using the `oldSKU` for google upgrades but the typescript interface only accepts `oldProductIdentifier` in the `purchaseSubscriptionOption` method. This makes sure all purchase methods have the same logic. Note that `purchaseSubscriptionOption` didn't exist before V5, but since some developers might have worked around the issue by using `oldSKU`, I think it's better to support that and avoid breaking their fixes.
- Loading branch information
Showing
2 changed files
with
45 additions
and
34 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
android/src/main/java/com/revenuecat/purchases/react/GoogleUpgradeInfo.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.revenuecat.purchases.react; | ||
|
||
class GoogleUpgradeInfo { | ||
private final String oldProductIdentifier; | ||
private final Integer prorationMode; | ||
|
||
public GoogleUpgradeInfo(String oldProductIdentifier, Integer prorationMode) { | ||
this.oldProductIdentifier = oldProductIdentifier; | ||
this.prorationMode = prorationMode; | ||
} | ||
|
||
public String getOldProductIdentifier() { | ||
return oldProductIdentifier; | ||
} | ||
|
||
public Integer getProrationMode() { | ||
return prorationMode; | ||
} | ||
} |
This file contains 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