-
Notifications
You must be signed in to change notification settings - Fork 15
Testing instructions for critical flows
Verify that the Payfast Payment Gateway plugin installs and activates successfully without any errors.
Test Steps:
- Navigate to the Woo account or GitHub and download the plugin zip file.
- Log in to the WordPress Admin Dashboard.
- Install the plugin.
- After successful installation, click the "Activate" button to activate the plugin.
- Observe the activation process for any error messages or issues.
- Check the "Plugins" page to ensure that the newly installed plugin appears in the list of active plugins.
Expected Result:
The plugin should install and activate without any errors. A success message should be displayed after activation, indicating that the Payfast Payment Gateway plugin is now active.
This plugin is an extension of WooCommerce, plugin should check the active status of WooCommerce when activating. If WooCommerce is not active, the 'Activate' button should be disabled.
Test Steps:
- Go to the Plugins section of the WordPress dashboard.
- Deactivate WooCommerce if active.
- Try to activate this extension.
Expected Result-
- The Plugin 'Activate' button should be disabled, and the admin should not be able to activate the plugin.
- A notice 'This plugin cannot be activated because required plugins are missing or inactive.' below the plugin should appear.
To verify that the Payfast Gateway integration is disabled and displays an appropriate message when the store currency is set to a currency other than South African Rands (ZAR) in the General Settings.
Test Steps:
- Navigate to the General Settings or Currency Settings section.
- Verify that the store currency is set to a currency other than ZAR (e.g., USD, EUR, GBP, etc.).
- Attempt to enable the Payfast Gateway integration while the store currency is set to a non-ZAR currency.
- Observe any error messages or notifications displayed during the enabling process.
Expected Result:
An appropriate error message is displayed, indicating that the Payfast Gateway integration cannot be enabled with the current store currency, and it suggests changing the store currency to South African Rands (ZAR) to enable the Payfast Gateway.
To verify that the Payfast plugin works correctly when the store currency is set to South African Rands (ZAR).
Test Steps:
- Navigate to the Payment Gateway settings or Plugins section.
- Locate the Payfast plugin and ensure that it is enabled.
Expected Result:
The Payfast plugin is enabled without any errors. Verify that all the required Payfast configuration settings are available, including Merchant ID, Merchant Key, etc.
Verify that enabling the Payfast option in the plugin settings makes it available on the checkout page for customers.
Test Steps:
- Log in to the admin dashboard.
- Navigate to the Payment Gateway settings
- Find the Payfast plugin settings.
- Check the box to enable the Payfast option.
- Save the settings.
Expected Result:
Payfast should be enabled and visible as a payment option on the checkout page for customers.
Verify that the provided title and description are shown correctly to customers on the checkout page.
Test Steps:
- Navigate to the Payment Gateway settings or Plugins section.
- Find the Payfast plugin settings.
- Enter a specific title and description in their respective fields.
- Save the settings.
- Proceed to the checkout page as a customer (using a test order).
Expected Result:
The specified title and description should be displayed as intended on the Payfast payment option at the checkout page.
Check that the Merchant ID, Merchant Key, and Passphrase are correctly set in the Payfast gateway plugin settings.
Test Steps:
- Log in to the eCommerce platform's admin dashboard.
- Navigate to the Payfast gateway plugin settings.
- Verify that the Merchant ID, Merchant Key, and Passphrase fields are present and labeled correctly.
- Enter valid values for the Merchant ID, Merchant Key, and Passphrase fields.
- Save the settings.
Expected Result:
The Merchant ID, Merchant Key, and Passphrase should be set correctly without any errors, and the plugin settings should be successfully saved.
Ensure that the "Send Debug Emails" option is functional and that emails are received by the specified address (if provided).
Test Steps:
- Navigate to the Payfast gateway plugin settings.
- Check the box for "Send Debug Emails."
- Enter a valid email address in the "Who Receives Debug E-mails?" field
- Save the settings.
- Initiate a test transaction through the Payfast gateway.
Expected Result:
Debug emails should be sent to the specified email address, providing transaction-related information.
if enabling the logging option records transaction event information in the logs for troubleshooting purposes.
Test Steps:
- Log in to the admin dashboard.
- Navigate to the Payfast gateway plugin settings.
- Check the box to enable logging.
- Save the settings.
- Perform a test transaction through the Payfast gateway.
- Navigate to WooCommerce > Status > Logs in the admin dashboard.
Expected Result:
A new log should be created, recording transaction event information related to the test transaction made using the Payfast gateway.
Ensure that no logs are created when the "Enable Logging" option is not checked.
Test Steps:
- Log in to the eCommerce platform's admin dashboard.
- Navigate to the Payfast gateway plugin settings.
- Ensure that the "Enable Logging" option is not checked (disabled).
- Save the settings.
- Perform a test transaction through the Payfast gateway.
- Navigate to WooCommerce > Status > Logs in the admin dashboard.
Expected Result:
No new logs should be created as the "Enable Logging" option is not checked, indicating that logging functionality is disabled.
Check if the Payfast Payment Gateway option is available on the checkout page for customers.
Test Steps:
- Add products to the cart.
- Proceed to the checkout page.
- Inspect the available payment options.
Expected Result:
Payfast Payment Gateway option should be available as one of the payment methods on the checkout page.
Ensure that the Payfast Payment Gateway option is only displayed when it is enabled in the plugin settings.
Test Steps:
- Navigate to the Payment Gateway settings or Plugins section.
- Find the Payfast plugin settings.
- Disable the Payfast Payment Gateway option.
- Save the settings.
- Proceed to the checkout page.
Expected Result:
Payfast Payment Gateway option should not be visible on the checkout page since it was disabled in the plugin settings.
Test the payment process using the Payfast Payment Gateway option.
Test Steps:
- Add products to the cart.
- Proceed to the checkout page.
- Select the Payfast Payment Gateway option.
- Complete the payment process.
Expected Result:
- The payment process should be successful without any errors, and the customer should receive a confirmation of the successful payment.
- Open the Order from the WooCommerce Order section.
- Order should have 'Processing' status.
Ensure that customers receive an order confirmation and payment receipt after successfully using the Payfast Payment Gateway.
Test Steps:
- Complete a test transaction using the Payfast Payment Gateway.
- Check the customer's email inbox for order confirmation.
Expected Result:
The customer should receive an order confirmation email containing details of the purchase, and payment details should be included, confirming the successful payment made through Payfast.
Test how the Payfast Payment Gateway handles payment failures.
Test Steps:
- Add products to the cart.
- Proceed to the checkout page.
- Select the Payfast Payment Gateway option.
- Cancel the payment process on the PayFast payment screen.
- Open the Order screen from the admin.
Expected Result:
The Payfast Payment Gateway should detect the payment failure and order status should be Cancelled.
Test if the PayFast sandbox account sends the Instant Transaction Notification (ITN) after successful payment on the checkout page.
Test Steps:
- Add products to the cart.
- Proceed to the checkout page.
- Select the PayFast Payment Gateway option.
- Complete the payment process using test payment details
- Wait for a few seconds to allow the ITN to be sent from the sandbox account to the specified ITN endpoint.
- Login on PayFast Sandbox account dashboard
Expected Result:
The ITN should be sent to the specified endpoint, and the endpoint should receive and process the ITN data. The ITN should contain details about the successful payment, including the order ID, payment status, etc.
To verify the functionality of the Payfast Payment method on the block-based checkout in the eCommerce platform.
Test Steps:
- Add products to the cart.
- Proceed to the checkout page using the block-based checkout option.
- Check for the presence of the Payfast Payment method block on the checkout page.
- Complete the payment
Expected Result: The Payfast Payment method block should be displayed as one of the available payment options during the block-based checkout process and the order should be placed without any error.
To verify the functionality of the PayFast Payment Gateway with a subscription product in WooCommerce.
Test Steps-
- Install and activate WooCommerce, WooCommerce Subscriptions, and WooCommerce PayFast Gateway plugins.
- Create a simple subscription product
- Add the subscription product to the cart.
- Proceed to the checkout page.
- Select PayFast Payment Gateway as the payment method.
- Complete the payment process using valid test payment details (provided by PayFast sandbox environment).
- After successful payment, go to "My Account" > "Orders."
- Find the order related to the subscription purchase and click on it to view the order details.
- Locate the related subscription information.
Expected Result: The subscription should be in "Active" status, indicating that the payment was successful, and the subscription is active.
To verify the renewal process for a subscription using the PayFast Payment Gateway.
Test Steps:
-
- Follow Steps from the above "Test Subscription Product with PayFast Payment Gateway" test case.
- Go to "My Account" > "Orders."
- Find the order related to the subscription purchase and click on it to view the order details.
- Locate the related subscription information.
- Click on the "Renew" button for the subscription.
Expected Result:
The subscription renewal process should be triggered, and the customer should be charged automatically using the PayFast Payment Gateway for the next billing cycle.