Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Commit

Permalink
Replace onCheckout with resolveStripeCheckout
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed May 11, 2021
1 parent a536fd9 commit 5b712ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class CashierRegisterServiceProvider extends BaseServiceProvider
parent::boot();

// Modify the checkout model.
BillingPortal::onCheckout(function ($checkout, Request $request, $billable, $plan, $subscription) {
BillingPortal::resolveStripeCheckout(function ($checkout, Request $request, $billable, $plan, $subscription) {
return $checkout->allowPromotionCodes();
});

Expand Down
2 changes: 1 addition & 1 deletion src/BillingPortal.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static function getStripeCheckoutOptions(Request $request, $billable, Pla
* @param \Closure $callback
* @return void
*/
public static function onCheckout(Closure $callback)
public static function resolveStripeCheckout(Closure $callback)
{
static::$stripeCheckoutInterceptor = $callback;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function setUp(): void
];
});

BillingPortal::onCheckout(function ($checkout, Request $request, $billable, $plan, $subscription) {
BillingPortal::resolveStripeCheckout(function ($checkout, Request $request, $billable, $plan, $subscription) {
return $checkout->allowPromotionCodes();
});
}
Expand Down

0 comments on commit 5b712ec

Please sign in to comment.