Test cases

The recommended test cases for your integration phase are:

Successful transaction

Once a customer has been redirected from your website to the PayU Payment Page, the customer will use the test credit cards details to simulate a successful test payment. The customer's browser will be redirected back to the your merchant website from where an API call will be issued. This API call response should reflect the successful payment state of the transaction.

Cancelled transaction

Once a customer has been redirected from the merchant's website to the PayU Payment Page, then a cancelled transaction can be simulated when the customer clicks on the cancel link on the PayU interface.The customer's browser will be redirected back to the your merchant website from where an API call will be issued. This API call response should reflect the cancelled state of the transaction.

Failed transaction

PayU transactions can have a maximum amount of up to 5 Million Rand.  To simulated an error or failed response use amounts larger than this amount as the transaction amount for payment. A customer will create a shopping basket greater than 5 Million Rand and when wanting to pay get redirected from your website to the PayU Payment Page. The customer will use one of the test credit cards to pay on the payment page. The customer's browser will be redirected back to the your merchant website from where an API call will be issued. This API call response should reflect the failed state of the transaction.

Live/Production transaction testing

Once you have completed a successful staging tests you can substitute the staging details with the production detail received from PayU. Once the production details are entered, it is recommended to do a couple of transactions with a real credit card. These transaction should be reflected in the transaction report within PayU's SafeShop. These transaction amounts can be refunded using PayU's SafeShop, but unfortunately the transaction fees not.