Request block:
POST https://example.com
Content-Type: application/json
{
"order_ref": "12321312",
"total": 123,
"items": [
{
"item_title": "Payment Test in Digital Wallet",
"unit_price": 123,
"quantity": 1
}
],
"buyer": {
"name": "Foo bar",
"personId": "123",
"phone": "123"
},
"callback_url": "https:\/\/example.com\/example\/example\/v1\/example\/example\/example\/123"
}
Current curl command from the block above:
curl -i -H Content-Type\:\ application/json -XPOST https\://example.com -d \{'
'\ \ \ \ \"order_ref\"\:\ \"12321312\"\,'
'\ \ \ \ \"total\"\:\ 123\,'
'\ \ \ \ \"items\"\:\ \['
'\ \ \ \ \ \ \ \ \{'
'\ \ \ \ \ \ \ \ \ \ \ \ \"item_title\"\:\ \"Payment\ Test\ in\ Digital\ Wallet\"\,'
'\ \ \ \ \ \ \ \ \ \ \ \ \"unit_price\"\:\ 123\,'
'\ \ \ \ \ \ \ \ \ \ \ \ \"quantity\"\:\ 1'
'\ \ \ \ \ \ \ \ \}'
'\ \ \ \ \]\,'
'\ \ \ \ \"buyer\"\:\ \{'
'\ \ \ \ \ \ \ \ \"name\"\:\ \"Foo\ bar\"\,\ '
'\ \ \ \ \ \ \ \ \"personId\"\:\ \"123\"\,'
'\ \ \ \ \ \ \ \ \"phone\"\:\ \"123\"'
'\ \ \ \ \}\,'
'\ \ \ \ \"callback_url\"\:\ \"https\:\\/\\/example.com\\/example\\/example\\/v1\\/example\\/example\\/example\\/123\"'
'\}'
'
Suggested curl command output:
curl -i -H "Content-Type: application/json" -XPOST https://example.com -d '{
"order_ref": "12321312",
"total": 123,
"items": [
{
"item_title": "Payment Test in Digital Wallet",
"unit_price": 123,
"quantity": 1
}
],
"buyer": {
"name": "Foo bar",
"personId": "123",
"phone": "123"
},
"callback_url": "https://example.com/example/example/v1/example/example/example/123"
}'
I'm not sure of the drawback, but the benefit is that it would a bit cleaner, so it would be easier to read/edit.