Post 寄信https://www.hurl.it/ 可以工作,但在命令行中发送带有cURL的同一个命令不会';T

Post 寄信https://www.hurl.it/ 可以工作,但在命令行中发送带有cURL的同一个命令不会';T,post,curl,Post,Curl,我正在建设一个网站,我正在整合一个支付服务,我需要将以下POST请求发送到 但该命令返回以下错误: curl: (35) error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number curl: (6) Could not resolve host: services, curl: (6) Could not resolve host: SL, curl: (3) [globbing] unmatched close brace

我正在建设一个网站,我正在整合一个支付服务,我需要将以下POST请求发送到

但该命令返回以下错误:

curl: (35) error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
curl: (6) Could not resolve host: services,
curl: (6) Could not resolve host: SL,
curl: (3) [globbing] unmatched close brace/bracket in column 164
将--sslv3更改为--sslv2我得到:

curl: (4) OpenSSL was built without SSLv2 support
curl: (6) Could not resolve host: services,
curl: (6) Could not resolve host: SL,
curl: (3) [globbing] unmatched close brace/bracket in column 164
将--sslv3更改为--tlsv1等待60秒后,我得到了以下结果:

curl: (35) Unknown SSL protocol error in connection to sis-t.redsys.es:25443 
curl: (6) Could not resolve host: services,
curl: (6) Could not resolve host: SL,
curl: (3) [globbing] unmatched close brace/bracket in column 164
curl: (35) Unknown SSL protocol error in connection to sis-t.redsys.es:25443 
curl: (6) Could not resolve host: services,
curl: (6) Could not resolve host: SL,
curl: (3) [globbing] unmatched close brace/bracket in column 164
然后移除--sslv3等待60秒后,我得到了以下结果:

curl: (35) Unknown SSL protocol error in connection to sis-t.redsys.es:25443 
curl: (6) Could not resolve host: services,
curl: (6) Could not resolve host: SL,
curl: (3) [globbing] unmatched close brace/bracket in column 164
curl: (35) Unknown SSL protocol error in connection to sis-t.redsys.es:25443 
curl: (6) Could not resolve host: services,
curl: (6) Could not resolve host: SL,
curl: (3) [globbing] unmatched close brace/bracket in column 164
我还尝试了以下命令

curl -v https://sis-t.redsys.es:25443/sis/realizarPago
我得到

* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to sis-t.redsys.es:25443

奇怪的是,使用webapp发出该请求会返回正确的响应。

My curl version 7.39.0在不使用任何ssl/tls选项时工作正常,并使用TLSv1.0/AES128-SHA显示
ssl连接。除此之外,您的数据包含嵌套的引号,并且实际上包含JSON数据,而不是www表单URL编码的数据;下面是一条经过修正和优化的命令行:

curl \
-H 'accept: application/json' \
-H 'content-type: application/json' \
https://sis-t.redsys.es:25443/sis/realizarPago \
-d '{
    "Ds_Merchant_MerchantSignature": "8A20806C19A5C1D4E25CF26A24F19265CD32F9DE",
    "Ds_Redsys_Url": "https://sis-t.redsys.es:25443/sis/realizarPago",
    "Ds_Merchant_Amount": 1000,
    "Ds_Merchant_ProductDescription": "ZZSaas services",
    "Ds_Merchant_UrlOK": "http://www.zzsaas.com/redsys/confirm",
    "Ds_Merchant_ConsumerLanguage": "001",
    "Ds_Merchant_Titular": "Zikzakmedia SL",
    "Ds_Merchant_UrlKO": "http://www.zzsaas.com/redsys/cancel",
    "Ds_Merchant_Currency": 978,
    "Ds_Merchant_MerchantData": None,
    "Ds_Merchant_Order": "12345ISW",
    "Ds_Merchant_TransactionType": "0",
    "Ds_Merchant_MerchantName": "Zikzakmedia SL",
    "Ds_Merchant_MerchantCode": "000000000",
    "Ds_Merchant_Terminal": 1,
    "Ds_Merchant_MerchantURL": "http://www.zikzakmedia.com"
}'