Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP
Currently all available functions on the cashier module are sync functions that wait for the payment gateway to return a result before continuing. Adding an async interface will allow for more advanced usage of cashier such as payments over websockets.
Current thoughts are to add two async interfaces per function.
Each of the function callbacks would receive the same result as the sync version.
An additional thought is to add an args parameter that would be passed into the callback function, however the payment gateway result would need to be appended to this in some form.
Currently all available functions on the cashier module are sync functions that wait for the payment gateway to return a result before continuing. Adding an async interface will allow for more advanced usage of cashier such as payments over websockets.
Current thoughts are to add two async interfaces per function.
Example for the
purchase
functionEach of the function callbacks would receive the same result as the sync version.
An additional thought is to add an
args
parameter that would be passed into the callback function, however the payment gateway result would need to be appended to this in some form.