Adyen / adyen-java-api-library

Adyen API Library for Java
MIT License
112 stars 131 forks source link

Adyen Kotlin Multiplatform Api Library #1207

Open tjerkw opened 6 months ago

tjerkw commented 6 months ago

It would be nice to have a adyen-kotlin-api-library which only uses kotlin multiplatform code. This could be used in both android, ios, server and web targets.

Seeing that the api clients seem generated from the OpenAPI spec, this seems to be do-able.. Only having the data classes for input.output generated would already help.

In terms of HTTP Client, ktor coudl be used, but thats a nice-to-have.

tjerkw commented 6 months ago

I implemented a first version, using a similar approach to this repo:

https://github.com/tjerkw/adyen-kotlin-multiplatform-api-library

It uses the default kotlin multiplatform template from openapi-generator: https://openapi-generator.tech/docs/generators/kotlin/

It doesn't have custom code... So no support for terminals yet, as that seems to be custom code for the nexo standard... I think we could port it. Also no crypto yet for the terminal api aclls.. But we could use an expect actual construct here.

The implementation that we need to port is here: https://github.com/Adyen/adyen-java-api-library/blob/main/src/main/java/com/adyen/terminal/security/NexoCrypto.java

What do you think?

I'm going to use this internally at Tebi (https://www.tebi.co)

@timon-langlotz FYI ;-)

tjerkw commented 6 months ago

Whats also missing in kotlint is the com.adyen.model.notification package, but that doesnt seem to be autogenerated. Is that correct?

DjoykeAbyah commented 3 weeks ago

Hi @tjerkw,

Apologies for the delayed reply! Thank you for your detailed request and for setting everything up! We appreciate the effort you've put into this.

A Kotlin multiplatform API library is not on our current roadmap, so we can't commit to it at the moment. However, your approach and the resources you’ve shared are very insightful. We’ll take your suggestions into account once we start an investigation, and I’ll get back to you with any updates.

Thank you again for your contribution and understanding. If there are any updates or if you have further information, please feel free to share.

Regards,

Djoyke Adyen