Hello,
I am trying to learn Elixir through building a remittance aggregator starting with consuming third party API services like MasterCard.
I tested regaular public API services with Elixir Req and livebook and it is fine but now for such services it is highly secured and encrypted.
Any idea if we have an Elixir library similar to the
one below built by MC team for OAUTH handling using RSA cryptography?
Hello,
Or if possible , is it possible to use Java libraries from elixir as the other method would be to utilize MasterCard own library below and add it to project :
This talk from @sasajuric about using the Kafka java libraries might help: https://www.youtube.com/watch?v=iVHpFoDXim4
You can indeed spawn a Java application behaving as an Erlang Node as seen from your Elixir application, using the Java library OtpErlang.jar
, built along the erlang application :jinterface
.
Note that the version available on Maven is very outdated, you will have to pull it from Erlang. I have a github action here building OtpErlang.jar
for the last 3 versions of OTP if you’d like. I wouldn’t advise pulling it from my repo yet but you can use it a a basis.
But in your case, I’d probably go with the Node library, or the Go library through wasmer/wasmex, since mastercard provides the same library for go, python, java, php, node, c#, and ruby. Or rewrite it in Elixir.
This would avoid running a companion java application along your main application. Also note that Jinterface/OtpErlang is now considered legacy but stable by the OTP team. This means that there are applications that actively use it and that they should not be disturbed by a breaking change, but that maybe it isn’t the best choice to depend on it for a new project today when there are alternatives.
Carefully weigh your options
.
Whoops, did not see the thread was 8 months old…
1 Like