Craft Loyalty Tokens plugin — OSTα3 POC update #3

This blog post is part 3 of a series of 4 articles to document the progress that is being made to integrate the Balance and Ledger API into my loyalty tokens plugin.

Progress made and issues overcome in week #2

Integrate the Ledger API ✓

Last week was all about integrating the Ledger API into the project. Being able to retrieve a transaction list for a specific user without the need to filter and sort the transactions was a welcome update.

The balance and all transactions are retrieved via the new endpoints, complete with click-through links to OST View for the wallet address, token details and each transaction in the ledger. Counter values in OST and USD are calculated by combining the OST/USD price points in the token endpoint with the balance/transaction values.

Balance and Ledger API at work in the Craft Commerce demo shop

Regression issue on company_to_user transactions ✓

The only drawback this week was an OST regression issue that was found in the current action endpoint. This prohibited me from executing company_to_user actions. Kudos to Kedar Chandrayan and the rest of the OST development team for quickly identifying and resolving the issue.

Plans ahead

Last thing on the OSTa3 ideas and developments list is to integrate a way to spend tokens inside a Craft Commerce web shop. I am still thinking of how to integrate this. Either as a discount or as a custom payment processor.

When this is decided, implemented and tested, I will focus on the other — but admittedly a bit boring — OSTa3 requirements:

  • Generate and log 1000 real transactions in the demo web shop that are traceable on OST View.
  • Write up the final blog post.
  • Create the final YouTube submission video.

Talk to you next week!

If you want to follow the progress, feel free to have a look at the GitHub repository for the Craft Loyalty Tokens plugin project.

If you want to read up on what OST is doing and how the future of utility blockchain applications looks like, is a good place to start.