Skip to content
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

feat(Checkout): Add request option parameters #1730

Closed
wants to merge 6 commits into from

Conversation

hutaoseven
Copy link

feat(Checkout): Add request option parameters

  • Add $opts parameter to Checkout and CheckoutBuilder classes
  • Allow custom request options to be passed when creating Checkouts
  • Add type import comments for PHPStan and Psalm

hutao added 4 commits January 8, 2025 11:42
-Add $opts parameter to Checkout and CheckoutBuilder classes
-Allow custom request options to be passed when creating Checkouts
-Add type import comments for PHPStan and Psalm
src/Checkout.php Outdated Show resolved Hide resolved
src/CheckoutBuilder.php Outdated Show resolved Hide resolved
* @return \Laravel\Cashier\Checkout
*/
public function create($items, array $sessionOptions = [], array $customerOptions = [])
public function create($items, array $sessionOptions = [], array $customerOptions = [], $opts = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still need to pipe this through to the create call.

/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's RequestOptionsArray?

Copy link
Author

@hutaoseven hutaoseven Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Stripe\Service\Checkout::create($params = null, $opts = null) Can be array

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hutaoseven hutaoseven closed this Jan 9, 2025
@hutaoseven hutaoseven deleted the hutao branch January 9, 2025 05:39
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.

2 participants