PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → array in HTTPAddParameter
array in HTTPAddParameter
Débuté par Wim Meurisse, 14 jan. 2018 17:23 - Aucune réponse
Posté le 14 janvier 2018 - 17:23
Hello,

I want to use this API:

POST /v1/orders/ HTTP/1.1
Authorization: Basic aHVudGVyMjo=
Content-Type: application/json
{
"merchant_order_id": "EXAMPLE001",
"amount": 995,
"currency": "EUR",
"description": "Example order #1",
"return_url": "http://www.example.com/",
"transactions": [
{
"payment_method": "ideal",
"payment_method_details": {
"issuer_id": "INGBNL2A"
}
}
]
}

So I created this HTTPForm:

sURL is string = "https://api.epay.ing.be"

sContentType is string = "application/json"

sHeader is string = "Authorization: Basic aHVudGVyMjo=="

HTTPCreateForm("EPAY")
HTTPAddParameter("EPAY","merchant_order_id","EXAMPLE001")
HTTPAddParameter("EPAY","merchant_order_id","EXAMPLE001")
HTTPAddParameter("EPAY","amount", "995")
HTTPAddParameter("EPAY","currency", "EUR")
HTTPAddParameter("EPAY","description", "Example order #1")
HTTPAddParameter("EPAY","return_url", "http://www.example.com/")
HTTPAddParameter("EPAY","transactions", ????)

But how do I get that "transactions" array into a parameter?

Thanks!