添加 Square 处理

问题描述

我正在尝试做https://developer.squareup.com/blog/android-in-app-payments-sdk-tutorial/

尝试将命令添加到终端

curl --request POST https://connect.squareupsandBox.com/v2/payments \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ACCESS_TOKEN" \
--header "Accept: application/json" \
--data '{
    "idempotency_key": "129268cb-fd6e-4f96-b20e-a0a5a5f949b1","amount_money": {
    "amount": 100,"currency": "USD"},"source_id": "cnon:CBASEFAEcrTTA3E_WAgmy_Bo7Ro"}

修改了它,现在

curl --request POST https://connect.squareupsandBox.com/v2/payments --header "Content-Type: application/json" --header "Authorization: Bearer ACCESS_TOKEN" --header "Accept: application/json" --data '{ "idempotency_key": "ae7dabe6-2aec-42ff-b868-473cbeb8f847","amount_money": { "amount": 100,"source_id": "cnon:CBESEAHOhAS6638Hf9htX8WldY4"}'

现在它向我显示错误

curl: (3) URL using bad/illegal format or missing URL

curl: (3) URL using bad/illegal format or missing URL

curl: (3) unmatched brace in URL position 1:

解决方法

我的终端有问题。 https://reqbin.com/curl - 我已经尝试过这项服务,现在它可以工作了。