Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] In modules/gateways/btcpay/createinvoice.php: Invoice error: 'invalid json: #81

Open
LastWoWProject opened this issue Jan 9, 2023 · 2 comments

Comments

@LastWoWProject
Copy link

I just installed btc pay server and downloaded whmcs modules from https://github.com/btcpayserver/whmcs-plugin

I have uploaded the module in gateways and i added my api key and URI to your BTCPay server ( wich i am guesing is my btcserver.domain.com ? ) Is what i did, i placed an order on my whmcs portal and i got the following error

//modules/gateways/btcpay/createinvoice.php

[ERROR] In modules/gateways/btcpay/createinvoice.php: Invalid invoice id #0
[ERROR] In modules/gateways/btcpay/createinvoice.php: Invoice error: 'invalid json:
400 Bad Request
The plain HTTP request was sent to HTTPS port
nginx
'
Any ideeas please?

Thank You

@votkon
Copy link

votkon commented Jan 10, 2024

+1 on this one.
Just got the same error:
[ERROR] In modules/gateways/btcpay/createinvoice.php: Invoice error: 'invalid json:
400 Bad Request
The plain HTTP request was sent to HTTPS port
nginx
'
Running with WHMCS 7.10.3
Will post an update here if my investigation will bear any fruit...

@votkon
Copy link

votkon commented Jan 10, 2024

ok, I think I solved this one:

In your BTCPay server payment gateway settings in WHMCS ensure that you have not forgotten to put "https://" in the "URI to your BTCPay server" field.
It looks like it is trying to send data to HTTP by default, which is pretty weird in 2024 imho.

I've also updated and restarted the server, but it feels like it's not related to this issue, as it's "the plain HTTP request was sent to HTTPS port"

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants