8 Test Tips

8 Test Tips

In addition to using the ”Message” element for simulating errors in the synchronous and asynchronous responses other methods can be used. These are described below:

  • HTTP communication
    • Provide an incorrect address e.g. i.e. remove “s” in paymentrequests – HTTP 404 Not Found
    • Remove client certificate – “Received fatal alert: handshake_failure”
  • Payment Request
    • “payeePaymentReference”
      • Provide too long – “FF08″,”errorMessage”:”Payment Reference is invalid”
      • Provide NULL – “FF08″,”errorMessage”:”Payment Reference is invalid”
    • “amount”
      • Provide “,” e.g. 12,09 – “PA02″,”errorMessage”:”Amount value is missing or not a valid number”
      • Provide less than 1 e.g. 0.5 – “AM06″,”errorMessage”:”Specified transaction amount is less than agreed minimum”
      • Provide 3 decimals e.g. 100.777 – “PA02″,”errorMessage”:”Amount value is missing or not a valid number”
    • “payeeAlias”
      • Provide a number that does not match the value in the certificate – “PA01″,”errorMessage”:”Parameter is not correct.”
    • “payerAlias”
      • Provide a too long or short number – “BE18″,”errorMessage”:”Payer alias is invalid”
    • “currency”
      • Provide another value than “SEK” – :”AM03″,”errorMessage”:”Invalid or missing Currency”
  • Callback confirmation
    • Provide an invalid ID – HTTP/1.1 404 Not Found
  • Refund
    • “payerPaymentReference”
      • Provide too long reference – “FF08″,”errorMessage”:”Payment Reference is invalid”
      • Provide NULL – “FF08″,”errorMessage”:”Payment Reference is invalid”
    • “originalPaymentReference”
      • This value is taken from the Payment Request callback element “paymentReference”
      • Use a value that is not valid i.e. change a value – “RF02″,”errorMessage”:”Original Payment not found or original payment is more than than 13 months old”
    • “payerAlias”
      • Provide a number that does not match the value in the certificate – “PA01″,”errorMessage”:”Parameter is not correct.”
    • “amount”
      • Provide an amount that is greater than the original payment – “RF08″,”errorMessage”:”Amount value is too large or amount exceeds the amount of the original payment minus any previous refunds”
        • Note – in production the payment balance is updated after each refund but in this simulator only the original amount is used in the validation
      • Provide “,” e.g. 12,09 – “PA02″,”errorMessage”:”Amount value is missing or not a valid number”
      • Provide less than 1 e.g. 0.5 – “AM06″,”errorMessage”:”Specified transaction amount is less than agreed minimum”
      • Provide 3 decimals e.g. 100.777 – “PA02″,”errorMessage”:”Amount value is missing or not a valid number”
    • “currency”
      • Provide another value than “SEK” – :”AM03″,”errorMessage”:”Invalid or missing Currency”