-1

I have a payments setup using SagePay and Continuous Authority/Repeat payments. I have a test situation where I need to test declines on the repeat payment as I need to handle the return codes that should come back for those. Is there anyway to test this situation? Ive googled this, and the best I have found is blocking IP addresses but this is not a solution and is not really testable in Unit Tests.

Is there a test card available that I could use that auths the first payment but declines the repeat?

1 Answers1

0

Blocking card ranges would also work in a similar way. It wouldn't be ideal as the code returned would be (I think) 4043, but you could test a failure.

In terms of incorporating it into unit tests, you could make a Reporting and Admin API call to block the IP / card range, perform the test, and then make another API call to unblock the card range / ip.

Rik Blacow
  • 1,139
  • 1
  • 7
  • 12