Save 36% for Black Friday! Learn more

All threads / Design a store credit schema

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Design a store credit schema

gafemoyano asked in Databases

Hi, I was wondering if anyone has some experience building a store credit system into a market place style app. Eg: Users could purchase 100USD in adavance and receive 120USD in store credits as incentive. Then they could check out products with this credit.

So far I've been checkint out the solidus platform. They have two tables, one for the store_credit purchase which records the available amount, used amount and remaining amount. Then there's store_credit_events which records the individiaul transactions.
Then when it comes to payments, they handle it as another payment method which the user can select, however it starts getting very complicated as I'd need to develop a somewhat generic way to handle different payment methods.

I'm feeling a bit over my head with this and was wondering if anyone could point me in the right direction to get this feature off the ground.

Thank you,
Felipe

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 39,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.