Giter Site home page Giter Site logo

Ryal

Build Status Coverage Status Hex.pm

[rahy-uh l]

noun

  1. rose noble.
  2. a former gold coin of Scotland, equal to 60 shillings.
  3. a former silver coin of Scotland, equal to 30 shillings.

An e-commerce library for elixir.

Usage

Ryal is a wrapper over several packages. Each one has its own purpose, but they all depend on two dependencies: Ecto and Ryal Core. The core concept of Ryal is to make it easier for you to make money, which is essencially what the core is: a payment system. If you're making a SaaS product and need to accept credit cards, the ryal_core package is all you need. This is basically all Ryal tries to do at the end of the day: put money in your bank account.

Each app inside of Ryal has a Readme which will detail exactly how to use that dependency. Each Ryal package has its own methods points of being configured and you should refer to those on their usage and configuration steps.

Quick Setup

First and foremost, add Ryal to your mixfile and each umbrella application to the applications.

# mix.exs

defp applications do
  [:ryal_core]
end

defp deps do
  [
    {:ryal, "~> 0.x"}
    # or, if you're brave and trust us (which you shouldn't):
    {:ryal, github: "ryal/ryal"}
  ]
end

Add this bad boy to your config.exs and replace App with the name of your application. We're setting it to :ryal_core because that's what everything builds off of. Please see Ryal.Core for an explanation on the keys provided in this configuration.

config :ryal_core,
  repo: App.Repo,
  user_module: App.User,
  user_table: :users,
  payment_gateways: [
    %{type: :bogus},
    %{type: :stripe, token: "sk_test_123"}
  ]

Now you'll want to copy over the migrations.

mix ryal.install

And, to mount the API (if you'll be using it), add this line to your router:

forward "/api", Ryal.Api.Router

Also, please don't forget to add pagination via Scrivener to your Repo:

defmodule App.Repo do
  use Ecto.Repo, otp_app: :app
  use Scrivener, page_size: 20
end

Contributing

Don't hesitate to open a PR! We're always happy to help out. If you have a question, a bug report, or a performance issue, we're happy to hear about it and answer it. Also, this project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Development

Run this command over every package that you wish to test:

MIX_ENV=test mix db.reset

Then run the tests:

mix test

Donations

1QHvBNzquxbczTwmdhr2cLCgcHrjWtFcD1

We currently accept donations with Bitcoin. If you're really interested in this project and would love to see the development accelerate, you can always send us a message via email or on the Elixir Slack and let us know what you need. By providing Bitcoin, the neurons in our brain suddenly begin feeling more interested. Wallet QR code and address:

1QHvBNzquxbczTwmdhr2cLCgcHrjWtFcD1

License

This package is available as open source under the terms of the MIT License.

Ryal's Projects

hex icon hex

A repo that wraps all of the main Ryal applications into one for hex to publish.

ryal icon ryal

:rosette: An e-commerce library for elixir; just to save you some pain, we're still in construction, so star us instead or donate!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.