morukele / paystack-rs

An open-source rust library for using the PayStack API
https://crates.io/crates/paystack-rs
MIT License
13 stars 5 forks source link

Implementing examples #4

Open morukele opened 1 year ago

morukele commented 1 year ago

I need help implementing examples of the API client in the /example folder.

As I build the API client and write tests; it will be nice to have examples of logic that can be done with the crate.

Some examples off the top of my head:

These are just examples, feel free to be creative with your examples. The goal is to show what can be built with the crate.

If you create an example, please name the file after your example, this will make it intuitive for other users. It will also be nice if you comment on the code.

This is a non-ending issue, so it is opened to as many contributors as possible.

kinglighthill commented 9 months ago

I would like to work on this

morukele commented 9 months ago

Awesome! can't wait to see your example!

kinglighthill commented 8 months ago

I have been trying to create an example for split transaction but I keep on getting this error. RequestNotSuccessful("400 Bad Request", "{\"status\":false,\"message\":\"Bearer subaccount must be part of split group\"}")

morukele commented 8 months ago

It seems that we have to create a split group first. Can you look into this?

kinglighthill commented 8 months ago

Is the split group not what transaction splits create endpoint is doing

morukele commented 8 months ago

@kinglighthill I am not sure, I will give it a look and get back to you. I will update this issue thread.

kinglighthill commented 8 months ago

Ok

morukele commented 8 months ago

Hi @kinglighthill I have figured out the issue, it was a problem with one of the fields in the 'SubaccountBodyBuilder' class. I have made the relevant changes and pushed the code.

You pull the latest version of the code and see an example of the transaction split in the test route.

kinglighthill commented 8 months ago

Ok, thank you