@oceanus-nk
Ich stelle hier mal das JSON der Steps rein, welche wir zur Abfrage der Transaktionsfos von der Wallee API nutzen, aber bitte daran denken, dass der API Endpoint und Request Body jeweils individuell anzupassen sind:
Spreadsheet Mapper um die Daten für den API Zugriff aufzubereiten
{
"executorflowuniqename" : "",
"description" : "",
"condition" : "",
"rank" : 530,
"active" : true,
"permaId" : 47,
"stepprovider" : "SpreadsheetMapper@com.synesty.stepesty.plugin.transformycore",
"stepproviderversion" : "1.0",
"stepProperty" : [ {
"datatype" : "STRING",
"contextkey" : null,
"value" : "false",
"key" : "cacheMode",
"type" : "IN"
}, {
"datatype" : "STRINGLIST",
"contextkey" : null,
"value" : "",
"key" : "disableWarnings",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "{\"groupByColumn\":\"\",\"groupMode\":\"\",\"sortByCol\":\"\",\"sortDir\":\"ASC\",\"colDefs\":[{\"colDef\":{\"name\":\"transaction_id\",\"sourceColName\":\"transaction_id\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"order_id\",\"sourceColName\":\"order_id\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"kind\",\"sourceColName\":\"kind\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"gateway\",\"sourceColName\":\"gateway\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"status\",\"sourceColName\":\"status\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"message\",\"sourceColName\":\"message\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"created_at\",\"sourceColName\":\"created_at\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"test\",\"sourceColName\":\"test\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"authorization\",\"sourceColName\":\"authorization\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"location_id\",\"sourceColName\":\"location_id\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"user_id\",\"sourceColName\":\"user_id\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"parent_id\",\"sourceColName\":\"parent_id\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"processed_at\",\"sourceColName\":\"processed_at\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"device_id\",\"sourceColName\":\"device_id\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"receipt\",\"sourceColName\":\"receipt\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"error_code\",\"sourceColName\":\"error_code\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"source_name\",\"sourceColName\":\"source_name\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"amount\",\"sourceColName\":\"amount\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"currency\",\"sourceColName\":\"currency\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"admin_graphql_api_id\",\"sourceColName\":\"admin_graphql_api_id\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"timestamp\",\"sourceColName\":\"\",\"value\":\"${(.now?long / 1000)?round}\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"path\",\"sourceColName\":\"\",\"value\":\"/api/charge-attempt/search?spaceId=${meta.wallee_spaceid!}&id=${authorization!}\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"hashstring\",\"sourceColName\":\"\",\"value\":\"${meta.xmacversion!}|${meta.wallee_accountid!}|${result['timestamp']!}|POST|${result['path']!}\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"decoded_key_md5\",\"sourceColName\":\"\",\"value\":\"${md5(decodeBase64(meta.wallee_authkey!))}\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"hmac512_alt\",\"sourceColName\":\"\",\"value\":\"${hmacSHA512(result['hashstring']!, decodeBase64(meta.wallee_authkey!), \\\"base64\\\")!}\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"hmac512_neu\",\"sourceColName\":\"\",\"value\":\"${hmacSHA512(result['hashstring']!, decodeBase64(meta.wallee_authkey!,\\\"ISO-8859-1\\\"), \\\"base64\\\", \\\"\\\", \\\"ISO-8859-1\\\", \\\"\\\")!}\",\"commentField\":\"\",\"colFunctions\":[]}},{\"colDef\":{\"name\":\"api_auth_header\",\"sourceColName\":\"\",\"value\":\"x-mac-version=${meta.xmacversion!}\\nx-mac-userid=${meta.wallee_accountid!}\\nx-mac-timestamp=${result['timestamp']!}\\nx-mac-value=${result['hmac512_neu']!}\",\"commentField\":\"\",\"colFunctions\":[{\"stringColFunction\":{\"trimMode\":\"SBENL\"}}]}}]}",
"key" : "mappingdefinition",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "",
"key" : "mappingMode",
"type" : "IN"
}, {
"datatype" : "SPREADSHEET",
"contextkey" : "output@SpreadsheetFilter_48",
"value" : "",
"key" : "source",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "",
"key" : "targetSchemaName",
"type" : "IN"
} ],
"steptype" : "DEFAULT",
"uiColor" : null,
"name" : "Daten aggregieren für Wallee API"
}
SpreadsheetURLDownload Step (Auswertung dann mittels JSON Reader Step)
{
"executorflowuniqename" : "",
"description" : "",
"condition" : "",
"rank" : 540,
"active" : true,
"permaId" : 49,
"stepprovider" : "SpreadsheetUrlDownload@com.asolida.delivor.plugin.steps.httpurldownloadimpl",
"stepproviderversion" : "1.0",
"stepProperty" : [ {
"datatype" : "ACCOUNT",
"contextkey" : null,
"value" : "",
"key" : "account",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "1",
"key" : "batchSize",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "application/json; charset=UTF-8",
"key" : "bodyContentType",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "UTF-8",
"key" : "encoding",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "",
"key" : "errorStatusCodes",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "",
"key" : "filename",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "",
"key" : "fileNameInList",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "",
"key" : "fileParameterName",
"type" : "IN"
}, {
"datatype" : "FILELIST",
"contextkey" : null,
"value" : "",
"key" : "filesToUpload",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "application/json; charset=UTF-8",
"key" : "headerContentType",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "${meta.wallee_api_host!}${path!}",
"key" : "host",
"type" : "IN"
}, {
"datatype" : "SPREADSHEET",
"contextkey" : "spreadsheet@SpreadsheetMapper_47",
"value" : "",
"key" : "input",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "10000",
"key" : "limit",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "POST",
"key" : "method",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "10000",
"key" : "numErrorsToStopFlow",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "addResponseContentColumn",
"key" : "outputMode",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "transaction_id,order_id,kind,gateway,status,message,created_at,test,authorization,location_id,user_id,parent_id,processed_at,device_id,receipt,error_code,source_name,amount,currency,admin_graphql_api_id,timestamp,path,hashstring,hashstring_to_byte,hmac512,api_auth_header",
"key" : "outputSourceColumns",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "",
"key" : "password",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "4",
"key" : "rateLimitPerSecond",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "{\r\n \"filter\": {\r\n \"children\": [\r\n {\r\n \"fieldName\": \"state\",\r\n \"operator\": \"EQUALS\",\r\n \"type\": \"LEAF\",\r\n \"value\": \"SUCCESSFUL\"\r\n },\r\n {\r\n \"fieldName\": \"charge.transaction.id\",\r\n \"operator\": \"EQUALS\",\r\n \"type\": \"LEAF\",\r\n \"value\": \"${authorization!}\"\r\n }\r\n ],\r\n \"type\": \"AND\"\r\n }\r\n}",
"key" : "requestBody",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "x-mac-version=${meta.xmacversion!}\r\nx-mac-userid=${meta.wallee_accountid!}\r\nx-mac-timestamp=${timestamp!}\r\nx-mac-value=${hmac512_neu!}",
"key" : "requestHeaders",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "false",
"key" : "sslCertificates",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "60",
"key" : "timeoutInSeconds",
"type" : "IN"
}, {
"datatype" : "STRING",
"contextkey" : null,
"value" : "",
"key" : "username",
"type" : "IN"
} ],
"steptype" : "BILLABLE",
"uiColor" : null,
"name" : "Transaktionsinfos aus Walle herunterladen"
}