woocommerce-gateway-payfast icon indicating copy to clipboard operation
woocommerce-gateway-payfast copied to clipboard

Add credentials validation and required field notice for Payfast in sandbox environment.

Open iamdharmesh opened this issue 4 months ago • 0 comments

All Submissions:

  • [x] Does your code follow the WooCommerce Sniffs variant of WordPress coding standards?
  • [ ] Have you written new tests for your changes, as applicable?
  • [x] Have you successfully run tests with your changes locally?
  • [ ] Will this change require new documentation or changes to existing documentation?

Changes proposed in this Pull Request:

This PR adds credentials validation in the Payfast payment settings when the settings are saved and displays a corresponding notice. It also makes changes to show a required credentials field notice when the credentials are blank, and it prevents Payfast from appearing on the front-end checkout page. Previously, this required notice was only implemented for the production environment. This PR ensures it works for the sandbox environment as well.

Closes #216

Steps to test the changes in this Pull Request:

  1. Remove all Payfast credentials from the settings and save the settings.
  2. Verify that a notice with the required fields error is visible.
  3. Try saving invalid credentials and verify that the merchant is prompted with an invalid credentials error.

Changelog entry

Add - Credentials validation and required field notice for Payfast in the sandbox environment

iamdharmesh avatar Oct 01 '24 09:10 iamdharmesh