Drupal Technical
[Drupal] How to test the credit card payment in drupal websites?
Suppose you have a drupal website which uses drupal ubercart module for handling payments. Your drupal website has several online products which can be purchased using credit card. In Drupal projects, we have to enter credit card informations in the Checkout page.
Please consider the following testcases which can be used to test credit card functionality.
- Ensure that the user is able to select the credit card payment method in the checkout page.
- Ensure that a field 'Card Number' is displayed in the payment method block.
- Ensure that a field 'Expiration Date' is displayed in the payment method block.
- Ensure that a field 'CVV' is displayed in the payment method block.
- Ensure that the user is able to enter the credit card number, expiration date, and CVV number.
- Ensure that an error message is displayed on leaving any field blank.
- Ensure that an error message is displayed on entering an invalid card number.
- Ensure that an error message is displayed on entering characters/symbols in card number field.
- Ensure that an error message is displayed on selecting an invalid expiration date.
- Ensure that an error message is displayed on entering an invalid CVV number.
- Ensure that an error message is displayed on entering characters/symbols in CVV field.
- Ensure that the card number and cvv number are removed on refreshing the check out page.
- Ensure that the user is redirected to Review order page on entering the valid credit card details.
- Ensure that the payment method is displayed as credit card in the Review order page.
- Ensure that only the last 4 digits of the card no: is displayed in the Review order page.
- Ensure that the expiration date is displayed in the Review order page.
- Ensure that CVV number is not displayed in the Review order page.
- Ensure that the user is redirected to the Check out page on clicking the back button.
- Ensure that the card number and CVV number are not displayed in the check out page.
Please note that the fields may change according to the specific project. In some of the projects, CVV fields may not be used. Here, I have specified all the fields. Thus, we can verify all the fields in the Drupal project by going through the above test cases.