Skip to content

CONV-243/244: Test and implement BillingPaymentService subscription checkout#213

Merged
menvil merged 2 commits into
developfrom
feature/CONV-243-test-billing-payment-service-creates-subscription-checkout
Jun 2, 2026
Merged

CONV-243/244: Test and implement BillingPaymentService subscription checkout#213
menvil merged 2 commits into
developfrom
feature/CONV-243-test-billing-payment-service-creates-subscription-checkout

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • CONV-243: Added failing test for BillingPaymentService::createSubscriptionCheckout
  • CONV-244: Implemented BillingPaymentService with gateway abstraction pattern
    • SubscriptionCheckoutGateway interface isolates Cashier from the service
    • CashierSubscriptionCheckoutGateway — production implementation using Cashier
    • FakeSubscriptionCheckoutGateway — test double (no real Stripe calls)
    • CheckoutSessionDto — return type carrying checkout URL
    • CannotCheckoutFreePlanException — thrown when free plan checkout is attempted
    • Bound SubscriptionCheckoutGateway → CashierSubscriptionCheckoutGateway in AppServiceProvider

Test plan

  • composer test passes (437 tests)
  • composer lint passes
  • No direct Cashier calls outside gateway layer

🤖 Generated with Claude Code


Summary by cubic

Implements subscription checkout in BillingPaymentService using a gateway abstraction to meet CONV-243/244. Free plans are blocked; paid plans return a checkout session URL.

  • New Features
    • Gateway layer: SubscriptionCheckoutGateway with CashierSubscriptionCheckoutGateway (uses laravel/cashier) and FakeSubscriptionCheckoutGateway for tests.
    • BillingPaymentService::createSubscriptionCheckout validates paid plans and returns CheckoutSessionDto.
    • Throws CannotCheckoutFreePlanException for free plan attempts.
    • Binds SubscriptionCheckoutGatewayCashierSubscriptionCheckoutGateway in AppServiceProvider; tests cover paid and free flows without real Stripe calls.

Written for commit 54ce5eb. Summary will update on new commits.

Review in cubic

menvil and others added 2 commits June 2, 2026 17:38
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 18993727-25b4-4869-aa59-b42eeb9208ea

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-243-test-billing-payment-service-creates-subscription-checkout

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@menvil menvil merged commit a034f01 into develop Jun 2, 2026
3 checks passed
@menvil menvil deleted the feature/CONV-243-test-billing-payment-service-creates-subscription-checkout branch June 2, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant