Question

I'm currently trying to integrate WorldPay into our website (custom PHP, no open source e-commerce framework).

I have got it to successfully process an 'AUTHORISED'/successful payment in Test Mode and the Payment Response URL all works, the customer then gets redirected to resultY.html (WorldPay's successful shopper result page) where I have included a button to take them back to the website. This indicates that generally it all works, however...

I have followed the documentation to try and test the 'ERROR' response when submitting a transaction, however I keep getting redirected back to 'Secure Payment Page' (with card detail inputs etc) with the following message:

'An available route for this purchase cannot be found. This may be caused by an error in the merchant configuration or by a remote systems failure.'

Upon error result I was expecting the customer to be directed to the resultC.html page (WorldPay's cancelled shopper result page), however I cannot seem to get the WorldPay Test Mode to fail to this page just to see how it handle errors. Ideally I would like the customer to see resultC.html on error transactions so I can show a button to redirect the customer back to the website.

I'm wondering if there is something in the 'Installation Administration' configuration in the WorldPay account that I'm missing. The only other failure related fields I can see is 'Payment Response failure count' - which is always 0 (despite sending numerous error transactions), 'Payment Response failure email address' (filled but no emails come through for error transactions), 'Attach HTTP(s) Payment Message to the failure email?' (which I have enabled).

Hoping someone with WorldPay experience give me some pointers, thanks in anticipation.

Was it helpful?

Solution

The 'ERROR' result is to do with capturing / settling the payment, so it's got nothing to do with errors in how your website integrates with WorldPay. Unfortunately WorldPay only sends you a 'Payment Response' if the user successfully creates a charge (this would be 'CAPTURED') or if they hit cancel. Like you said in your comment, the user only goes to resultC.html if they hit 'cancel'.

You might also get a 'Callback Failure' if WorldPay can't access your callback URL. Generally speaking if there is an error with creating the charge on WorldPay's end, they won't let you know (similarly it doesn't let you know when the charge is settled, or refused).

In the last two years we've never had an error creating a charge, so I don't think you need to worry about it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top