Commit 73a3444
committed
feat(payments-next): Add free trial support to checkout flow
Because:
* Users eligible for free trials should receive trial subscriptions when checking out via Stripe or PayPal
* Subscription management flows need to handle 'trialing' status for cancel and resubscribe actions
This commit:
* Integrates getFreeTrialEligibility with existing payWithStripe and payWithPaypal methods
* Records a free trial record with firestore
* fixes bug with strapi country-code checks
* updates subscription management page to allow for cancellations of 'trialing' subscriptions
* Adds tests for new and existing cases
Closes #PAY-35431 parent 9e880f4 commit 73a3444
5 files changed
Lines changed: 1123 additions & 110 deletions
File tree
- libs/payments
- cart/src/lib
- management/src/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
0 commit comments