Title: Testing on localhost?
Last modified: November 9, 2023

---

# Testing on localhost?

 *  [joncon62](https://wordpress.org/support/users/joncon62/)
 * (@joncon62)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/testing-on-localhost-3/)
 * I’m testing this in sandbox mode and I can get this working on my live site but
   I need to test it on my localhost where I do all my development, however it doesn’t
   work there. I get the following error in the checkout:
 * > There was a problem contacing GoCardless
 * The error log says:
 *     ```wp-block-code
       2023-11-09T13:58:42+00:00 INFO GC front end log (CustomerID: 1): Submit button clicked
       2023-11-09T13:58:56+00:00 ERROR GC front end error (CustomerID: 1): Billing request setup error: {\"readyState\":0,\"status\":0,\"statusText\":\"timeout\"}
       ```
   
 * Both the live site and localhost have the same settings. GoCardless don’t allow
   a localhost endpoint so can this work on localhost?

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

 *  Plugin Author [Adam Kent](https://wordpress.org/support/users/kadament/)
 * (@kadament)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/testing-on-localhost-3/#post-17203535)
 * Hi, thanks for your query. Test payment should work in a local environment (it
   does for me). Note that the webhooks won’t unless you open your server & router
   to incoming http requests (not suggested). There’s a multitude of factors that
   could be effecting the issue that you face, but it’s going to be related to your
   environment configuration if the same setup works in your live environment. The
   error you are seeing is suggesting that the request to gocardless is being timed
   out – this is likely due to security configuration in your environment. Please
   check that you are running in test mode, and in your browser open the network
   tab and then try a payment – check for errors / response headers in the pre-flight
   request to GoCardless. This should help you diagnose the issue. Thanks.
 *  Thread Starter [joncon62](https://wordpress.org/support/users/joncon62/)
 * (@joncon62)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/testing-on-localhost-3/#post-17207713)
 * Thanks for your reply. I’m not familiar with diagnosing network problems. I can
   confirm I am in test mode and when I look at the Network tab I see 3 admin-ajax.
   php requests. The middle one has a red checkmark for [http://localhost/snappytickets/wp-admin/admin-ajax.php](http://localhost/snappytickets/wp-admin/admin-ajax.php),
   status (canceled) after 4s.
 * The response headers, protocol, remote address, connection ID fields are all 
   blank for this request.
 * Does this mean anything to you?
 * I did try another plugin and that could contact GoCardless on my localhost but
   I would rather use yours.
 *  Plugin Author [Adam Kent](https://wordpress.org/support/users/kadament/)
 * (@kadament)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/testing-on-localhost-3/#post-17259722)
 * Hi Jon, did you get this part working? Thanks
 *  Thread Starter [joncon62](https://wordpress.org/support/users/joncon62/)
 * (@joncon62)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/testing-on-localhost-3/#post-17260383)
 * Thanks for asking, I still can’t get it to work on my localhost. I thought it
   may be due to not having an ssl certificate so I created one but that didn’t 
   fix the problem. Did you have to do anything ‘custom’ to get it working? I am
   using MAMP (6.8) on macbook pro, all latest updates. I am using php 7.4.33 so
   not the latest as my site doesn’t work with 8+

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

The topic ‘Testing on localhost?’ is closed to new replies.

 * ![](https://ps.w.org/wc-gocardless-instant-bank-payments/assets/icon-256x256.
   png?rev=2802969)
 * [Instant Bank Payments via GoCardless for WooCommerce](https://wordpress.org/plugins/wc-gocardless-instant-bank-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-gocardless-instant-bank-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-gocardless-instant-bank-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-gocardless-instant-bank-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-gocardless-instant-bank-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-gocardless-instant-bank-payments/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [joncon62](https://wordpress.org/support/users/joncon62/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/testing-on-localhost-3/#post-17260383)
 * Status: not resolved