Skip to content

Conversation

peterwilsoncc
Copy link
Collaborator

All Submissions:

  • Does your code follow the WooCommerce Sniffs variant of WordPress coding standards?
  • Have you written new tests for your changes, as applicable?
  • 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:

Adds logging of token cancellation requests sent to Payfast when the store owner has enabled test mode or logging.

The log entry is Cancellation request for token [token key] for subscription [id] sent to Payfast

Closes https://linear.app/a8c/issue/PAYFAST-34/log-token-cancellation-requests

Steps to test the changes in this Pull Request:

  1. Ensure logging is enabled in the payfast settings, wp-admin/admin.php?page=wc-settings&tab=checkout&section=payfast&from=WCADMIN_PAYMENT_SETTINGS
  2. Enable Subscriptions and create a subscription product (if required)
  3. Purchase the subscription product
  4. Go to My Account > My Subscription/s
  5. Click the link to the new subscription (this won't be required if you only have one subscription)
  6. Click Change Payment
  7. Proceed through the payfast flow until you return to the store
  8. Open the Logs in the admin, /wp-admin/admin.php?page=wc-status&tab=logs
  9. View the most recently modified payfast log
  10. Towards the bottom of the file, you should see the log message described above

Changelog entry

Add - Log token cancellation requests sent to Payfast if logging enabled

@peterwilsoncc peterwilsoncc requested a review from dkotter August 14, 2025 02:38
@peterwilsoncc peterwilsoncc self-assigned this Aug 14, 2025
@peterwilsoncc peterwilsoncc marked this pull request as draft August 14, 2025 03:54
@vikrampm1 vikrampm1 added this to the Future Release milestone Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants