Title: Simulator Return Error
Last modified: August 20, 2016

---

# Simulator Return Error

 *  Resolved [underclass](https://wordpress.org/support/users/underclass/)
 * (@underclass)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/simulator-return-error/)
 * Hello
    In simulator mode I receive the following message
 * INVALID –
 * I am assuming this is part of the 4020 err for invalid ip addresses, should the
   simulator mode display the invalid ip?
 * Thanks
 * [http://wordpress.org/extend/plugins/sagepay-direct-for-woocommerce-payment-gateway/](http://wordpress.org/extend/plugins/sagepay-direct-for-woocommerce-payment-gateway/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [swicks](https://wordpress.org/support/users/swicks/)
 * (@swicks)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349112)
 * Hi
 * Apologies I’ve only just picked this up. Yes it is suppose to return the complete
   error message after INVALID (which contains the invalid IP). This is fixed in
   the next release. Thanks for letting me know.
 * Regards
 * Steve
 *  Plugin Author [swicks](https://wordpress.org/support/users/swicks/)
 * (@swicks)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349144)
 * Fixed in next release
 *  [kapitaine](https://wordpress.org/support/users/kapitaine/)
 * (@kapitaine)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349162)
 * Hi Swicks, first of all, thanks for the plugin, looks to be great!
 * However, I too am also getting this error in version 0.1.5 when I go to checkout
   on a product.
 * When you say it will be fixed in the next release, do you mean a version after
   this? And if so, when do you think? (sorry for the pressure!).
 * Also, how do I configure my test SagePay account with your plugin? Is it really
   only the ‘Vendor Name’ that is required in the settings or is there a place to
   put my password?
 * Thanks,
    Mikey
 *  Plugin Author [swicks](https://wordpress.org/support/users/swicks/)
 * (@swicks)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349163)
 * Hi
    The fix is only to return the ip address your using So I wasn’t too concerned
   in the update. You need to setup a SagePay account giving u a simulator account
   with vendor name – setup your ISP IP address in your SagePay simulator screen.
   Set direct to simulator, you don’t need a password. Regards Steve
 *  [kapitaine](https://wordpress.org/support/users/kapitaine/)
 * (@kapitaine)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349164)
 * Hi
 * It’s odd, because no matter what, I always get the “INVALID -” message.
 * I have specified my IP in the SagePay simulator account along with the IP of 
   the server the website is hosted on.
 * They say the following:
 * >  If you have sent badly formatted or incorrect data in any of the fields you’ll
   > receive an INVALID message with an explanation of the error in the StatusDetail
   > field.
   > If everything is formatted correctly and is validated successfully an OK response
   > will be returned to your server with a redirectURL to which your code should
   > send the user. This will present you with another Simulator page from which
   > you can simulate Server Notification POSTs.
 * However, all data I am sending seems to be just fine and checks out. I’m **not**
   however, sending this via HTTPS, but rather standard HTTP – could that cause 
   this or should I be able to test this way?
 * Many thanks,
    Michael.
 *  Plugin Author [swicks](https://wordpress.org/support/users/swicks/)
 * (@swicks)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349165)
 * Hi
    If you are using 0.1.5 – add these 4 lines of code before `return $response_status`
   on line 835.
 *     ```
       else
                   {
                       return $response_statusdetail;
                   }
       ```
   
 * This should now display the IP address Sagepay thinks you are hosted on.
 * regards,
 * Steve
 *  Plugin Author [swicks](https://wordpress.org/support/users/swicks/)
 * (@swicks)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349166)
 * In simulator mode you can use HTTP – the message back should now look like:
 * INVALID – The IP address of the server sending the transaction does not match
   the valid IP address ranges listed in the Simulator. The IP address Simulator
   sees for your server is 149.127.120.232. You can add this IP in the Accounts 
   section of Simulator if you wish.
 *  [kapitaine](https://wordpress.org/support/users/kapitaine/)
 * (@kapitaine)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349168)
 * Hello Swicks!
 * Just wanted to let you know that this did the trick. Perfect. Thank you very 
   much again for your hard work.
 * I got the proper error back, add the correct IP (as shown by the new error from
   your plugin) to the simulator with SagePay, and now it works as expected.
 * It’s great you’re offering this plugin for free, but if it helps to make the 
   updates / bug fixes better, maybe consider charging a small fee? I’d gladly pay
   and I’m sure others would too.
 * Thanks again!
    Mikey.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Simulator Return Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sagepay-direct-for-woocommerce-payment-
   gateway_8284e5.svg)
 * [WooCommerce SagePay Direct Payment Gateway](https://wordpress.org/plugins/sagepay-direct-for-woocommerce-payment-gateway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sagepay-direct-for-woocommerce-payment-gateway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sagepay-direct-for-woocommerce-payment-gateway/)
 * [Active Topics](https://wordpress.org/support/plugin/sagepay-direct-for-woocommerce-payment-gateway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sagepay-direct-for-woocommerce-payment-gateway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sagepay-direct-for-woocommerce-payment-gateway/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [kapitaine](https://wordpress.org/support/users/kapitaine/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/simulator-return-error/#post-3349168)
 * Status: resolved