• 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:

    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

    (@kadament)

    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

    (@joncon62)

    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 https://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

    (@kadament)

    Hi Jon, did you get this part working? Thanks

    Thread Starter joncon62

    (@joncon62)

    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.