Repository navigation
Conversation
Remove the client-side offline gate on the Issue a Refund form; purchases-api already records offline refunds. Drop the unused disabled prop and only_online_payments copy from RefundForm and update the refund info note.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: https://app.clickup.com/t/9014802374/86bck106e
Summary
Enables the "Issue a Refund" form on the sponsor purchase detail page for orders paid offline (invoice). Until now the form was disabled client-side for offline orders and showed "Only online payments are eligible for refunds", even though
purchases-apialready supports offline refunds (RefundService.create_refundrecords them as processed immediately, no gateway call).Changes
sponsor-order-details.js: stop passingdisabledtoRefundFormfor offline orders.RefundForm: remove the now-unuseddisabledprop, the warning alert and therefund_form.only_online_paymentsi18n key.en.json: rewordrefund_form.infoso it explains both cases (Stripe refunds are queued and processed through Stripe; offline refunds are recorded as refunded immediately and the funds are returned outside the platform).Tests
sponsor-order-details.test.js: the refund form is enabled for Offline and Online orders, and submitting an offline refund callsrefundSponsorOrder(orderId, amountInCents, reason).refund-form.test.js: info note renders and submit is enabled on first render.yarn testpasses (231 suites, 2016 tests).Not verified
Summary by CodeRabbit