Closed Gesuato closed 3 months ago
Boa noite,
Eu estou tentando adicionar algumas aditionalInfos e o resultado da api sempre retorna vazio.
Codigo
try { val sdk = WooviSDK(appId = DEV_KEY) val uuid = UUID.randomUUID() val additionalInfos = listOf( AdditionalInfo("key1", "value1"), AdditionalInfo("key2", "value2") ) val response = sdk.createCharge { additionalInfo = additionalInfos value = valueResult.toInt() correlationID = uuid.toString() } call.respond(response) } catch (e: InterruptedException) { call.respond(HttpStatusCode.InternalServerError, e) } catch (e: ExecutionException) { call.respond(HttpStatusCode.InternalServerError, e) }
Result:
{ "correlationID": "5014a80a-f780-4c94-ad91-b36e19e31672", "brCode": "00020101021226950014br.gov.bcb.pix2573api.openpix.com.br/api/testaccount/qr/v1/f16f7db63d724c8b9af81834080efacc52040000530398654041.005802BR5904Fuse6009Sao_Paulo62290525f16f7db63d724c8b9af81834063042A21", "charge": { "value": 100, "identifier": "f16f7db63d724c8b9af81834080efacc", "correlationID": "5014a80a-f780-4c94-ad91-b36e19e31672", "paymentLinkID": "76b9bca7-32af-474e-b8f6-3386be6dd6cb", "transactionID": "f16f7db63d724c8b9af81834080efacc", "status": "ACTIVE", "additionalInfo": [], "discount": 0, "valueWithDiscount": 100, "expiresDate": "2024-07-25T02:18:11.875Z", "type": "DYNAMIC", "createdAt": "2024-07-24T02:18:11.938Z", "updatedAt": "2024-07-24T02:18:11.938Z", "brCode": "00020101021226950014br.gov.bcb.pix2573api.openpix.com.br/api/testaccount/qr/v1/f16f7db63d724c8b9af81834080efacc52040000530398654041.005802BR5904Fuse6009Sao_Paulo62290525f16f7db63d724c8b9af81834063042A21", "expiresIn": 86400, "pixKey": "2ad387f6-bcc2-41d1-92bb-5fa4e199b0d5", "paymentLinkUrl": "https://openpix.com.br/pay/76b9bca7-32af-474e-b8f6-3386be6dd6cb", "qrCodeImage": "https://api.openpix.com.br/openpix/charge/brcode/image/76b9bca7-32af-474e-b8f6-3386be6dd6cb.png", "globalID": "Q2hhcmdlOjY2YTA2NDYzZmQwMmZhZTY2NjBmYTUxYw==" } }
está funcionando ?
Não
o problema seria aqui https://github.com/woovibr/java-sdk/blob/main/src/main/kotlin/Charge.kt#L174 ?
fixed
Boa noite,
Eu estou tentando adicionar algumas aditionalInfos e o resultado da api sempre retorna vazio.
Codigo
Result: