-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix issues with refund queries #5422
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
Conversation
from refund queries Signed-off-by: Eric Dobbertin <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
|
@aldeed Updated |
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
|
@kieckhafer Actually I think GraphQL |
|
@aldeed reverted most of those changes, now |
…n either / or with orderId Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
|
@kieckhafer Everything works correctly now for both anon and account orders. I can't approve this because I created it but I'm fine with merging it. |
Impact: major
Type: bugfix
Issue
Discovered a few issues with recently added refunds GraphQL queries. In general, these are blocking being able to check out and view the order on storefront, and being able to capture the payments on admin (using Stripe).
refundsandrefundsByPaymentIdsqueries.getOrderQueryutil function already does permission checks.imports/plugins/core/orders/server/no-meteor/resolvers/Order/payments.jsis callingrefundsByPaymentIdwithorder.tokenfor thetokenparam, but that's the hashed token so it fails.Solution
refundsByPaymentIdshould be looking up the order from DB again in cases where we already have it. Maybepayments.jsshould just pass the wholeorder, and updaterefundsByPaymentIdto skip the permission / lookup stuff when the order is passed in.captureOrderPaymentfrom browserBreaking changes
None
Testing
developbranch of the example storefront, and then capture that order payment in Reaction Admin.