Gracefully handle unrefundable ticket refund attempts#1063
Open
timiwahalahti wants to merge 3 commits intoWordPress:productionfrom
Open
Gracefully handle unrefundable ticket refund attempts#1063timiwahalahti wants to merge 3 commits intoWordPress:productionfrom
timiwahalahti wants to merge 3 commits intoWordPress:productionfrom
Conversation
… of is_refundable logic bit better and show message if refunds enabled but payment method says no
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.
CampTix allows users to refund their ticket purchases, but Stipe and PayPal only allow refunds within a certain number of days after the ticket purchase.
transaction_is_refundablemethod was added toCampTix_Payment_Methodwith it defaulting to true in order to maintain backwards compatibility.CampTix_Payment_Method_StripeandCampTix_Payment_Method_PayPaloverride that method with their own, quite similar checks.If the method class recognises that the transaction is not refundable,
WP_Erroris returned for passing a nice message to the tickets frontend if refunds are otherwise enabled.Also if someone tries to go directly to the refund URL, they will be sent to the tickets page with an error and that will be logged. Some code styling was made on the same go.
Fixes #577
Props @iandunn @actual-saurabh @ePascalC
Screenshots
How to test the changes in this Pull Request: