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

Suppress pay now on user dashboard if none configured #27954

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Suppress pay now on user dashboard if none configured

Before

On the dmaster build currently if a user does a pay later contribution via a contribution page they will see a 'pay now' buttong. However, this does not work unless the site has a configured default payment page

image

After

The link only shows if the default payment page is configured

Technical Details

This is a minimal fix, that attempts to honor what the existing code is doing. One thing that makes this worse is that the civicrm component settings form is messed up - ie the Default Payment Page is required rather than optional - so when it is not configured it appears configured. There are other issues with that form - the legacy of the 'contribution_invoice_settings' pseudosetting.

However, I suspect @petednz might be happy with this fix & not want to push to get more fixed

Comments

@civibot
Copy link

civibot bot commented Oct 27, 2023

🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷

Introduction for new contributors...
  • If this is your first PR, an admin will greenlight automated testing with the command ok to test or add to whitelist.
  • A series of tests will automatically run. You can see the results at the bottom of this page (if there are any problems, it will include a link to see what went wrong).
  • A demo site will be built where anyone can try out a version of CiviCRM that includes your changes.
  • If this process needs to be repeated, an admin will issue the command test this please to rerun tests and build a new demo site.
  • Before this PR can be merged, it needs to be reviewed. Please keep in mind that reviewers are volunteers, and their response time can vary from a few hours to a few weeks depending on their availability and their knowledge of this particular part of CiviCRM.
  • A great way to speed up this process is to "trade reviews" with someone - find an open PR that you feel able to review, and leave a comment like "I'm reviewing this now, could you please review mine?" (include a link to yours). You don't have to wait for a response to get started (and you don't have to stop at one!) the more you review, the faster this process goes for everyone 😄
  • To ensure that you are credited properly in the final release notes, please add yourself to contributor-key.yml
  • For more information about contributing, see CONTRIBUTING.md.
Quick links for reviewers...

➡️ Online demo of this PR 🔗

@civibot civibot bot added the master label Oct 27, 2023
@petednz
Copy link

petednz commented Oct 27, 2023

I possibly haven't grasped this @eileenmcnaughton - on the site in question, it does have the "Default invoice payment page" set and I checked it and it does have Stripe on it- ah ha maybe it is this statement "so when it is not configured it appears configured" - so i changed the value of the default page, then changed it back and saved. "Configuration saved" and bingo, the Pay Now button leads to the "Default invoice payment page"

@eileenmcnaughton
Copy link
Contributor Author

@petednz yeah that's it! Once the form is a bit cleaned up - #27955 - it should be easy to change the metadata to make that field show nothing when not configured

@eileenmcnaughton
Copy link
Contributor Author

test this please

@mattwire mattwire merged commit 79a0247 into civicrm:master Oct 30, 2023
@eileenmcnaughton eileenmcnaughton deleted the pay_now branch October 30, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants