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

Set payment order to null when setting the cart #1888

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

alecritson
Copy link
Collaborator

There is a potential for a payment provider to have access to a previously set order when calling the order() method on a payment type.

Since we always need a cart but not always an order we should be okay with setting the order to null when calling the cart() method.

@alecritson alecritson requested a review from glennjacobs July 30, 2024 11:28
Copy link

vercel bot commented Jul 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 11:34am

@alecritson alecritson merged commit 97a90ad into 1.x Jul 30, 2024
23 checks passed
@alecritson alecritson deleted the hotfix/fix-property-setting-on-payment-type branch July 30, 2024 11:44
@wychoong
Copy link
Contributor

wychoong commented Aug 1, 2024

currently I dont have issue with this change, but this feels odd to make cart and order mutually exclusive. say if I want to chain ->order($order)->cart($cart), it will not be possible after this change

would it be better to check if the order belongs to the cart before setting to null?

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.

3 participants