-
Notifications
You must be signed in to change notification settings - Fork 1
feat: iap upgrade and downgrade #110
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
Conversation
da33ba1 to
1609134
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #110 +/- ##
============================================
+ Coverage 68.89% 76.45% +7.56%
- Complexity 66 69 +3
============================================
Files 35 8 -27
Lines 1064 361 -703
Branches 126 0 -126
============================================
- Hits 733 276 -457
+ Misses 302 85 -217
+ Partials 29 0 -29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
...tration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout-change/index.ts
Outdated
Show resolved
Hide resolved
...tration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout-change/index.ts
Outdated
Show resolved
Hide resolved
...tration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout-change/index.ts
Show resolved
Hide resolved
...tration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout-change/index.ts
Outdated
Show resolved
Hide resolved
...rchases/component/sw-in-app-purchase-checkout-change/sw-in-app-purchase-checkout-change.scss
Show resolved
Hide resolved
...ation/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout-overview/index.ts
Outdated
Show resolved
Hide resolved
...ation/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout-overview/index.ts
Outdated
Show resolved
Hide resolved
...administration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout/index.ts
Outdated
Show resolved
Hide resolved
...administration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout/index.ts
Outdated
Show resolved
Hide resolved
...administration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout/index.ts
Show resolved
Hide resolved
82ce7ab to
0d2eeb6
Compare
...chase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.html.twig
Outdated
Show resolved
Hide resolved
...odule/sw-in-app-purchases/component/sw-in-app-purchase-checkout-subscription-change/index.ts
Outdated
Show resolved
Hide resolved
...p-purchase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.scss
Outdated
Show resolved
Hide resolved
...p-purchase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.scss
Outdated
Show resolved
Hide resolved
...p-purchase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.scss
Outdated
Show resolved
Hide resolved
...p-purchase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.scss
Outdated
Show resolved
Hide resolved
...p-purchase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.scss
Outdated
Show resolved
Hide resolved
...p-purchase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.scss
Outdated
Show resolved
Hide resolved
...p-purchase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.scss
Outdated
Show resolved
Hide resolved
...administration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout/index.ts
Show resolved
Hide resolved
...odule/sw-in-app-purchases/component/sw-in-app-purchase-checkout-subscription-change/index.ts
Outdated
Show resolved
Hide resolved
c22e4cc to
f896b2f
Compare
...administration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout/index.ts
Show resolved
Hide resolved
src/Resources/app/administration/src/module/sw-in-app-purchases/snippet/de-DE.json
Outdated
Show resolved
Hide resolved
1772d83 to
cba80a9
Compare
64b4fdf to
e33b9b5
Compare
|
I'm missing a description for this PR and this whole feature. This has already been very sidelined and not well documented, to have this at least here would be at least something 💙 |
En0Ma1259
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor things, except the language
...odule/sw-in-app-purchases/component/sw-in-app-purchase-checkout-subscription-change/index.ts
Outdated
Show resolved
Hide resolved
...chase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.html.twig
Outdated
Show resolved
Hide resolved
...chase-checkout-subscription-change/sw-in-app-purchase-checkout-subscription-change.html.twig
Outdated
Show resolved
Hide resolved
...administration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout/index.ts
Outdated
Show resolved
Hide resolved
e33b9b5 to
af91e38
Compare
* feat: iap upgrade and downgrade (#110) * fix: pipeline * styling: fix spacing * chore: increase composer version
In-App Purchase: Upgrade and Downgrade
If a merchant has already purchased an in-app feature, they can now upgrade to a higher plan (e.g., from Basic to Pro) or downgrade to a lower plan (e.g., from Pro to Basic).
As part of the implementation, a new admin component was introduced based on the updated design. Additionally, the purchase process was redefined, since we now require a cart to check whether the merchant already owns the feature. This information is retrieved via a new SBP endpoint.
The SBP endpoint returns information about the merchant's current in-app purchases. Based on that data, we can determine if the requested feature is already owned and whether an upgrade or downgrade is applicable.
Furthermore, the
api.in-app-purchases.cart.ordercall has now optional supports for an additional body parameter:For upgrades:
For downgrades:
If the
subscriptionChangeparameter is not set, the system will treat the request as a new purchase.