Skip to content

An easy to use library that allows you to manage and access payment icons

License

Notifications You must be signed in to change notification settings

t1ll/payment_icons

This branch is 2482 commits behind activemerchant/payment_icons:master.

Folders and files

NameName
Last commit message
Last commit date
Mar 23, 2018
Apr 9, 2018
Aug 21, 2015
Mar 26, 2018
Mar 5, 2018
Oct 11, 2017
May 16, 2017
Mar 5, 2018
Mar 5, 2018
Jan 4, 2017
Apr 2, 2018
Aug 24, 2015
Feb 23, 2017
Aug 24, 2015
Mar 5, 2018
Sep 1, 2015

Repository files navigation

Payment Icons

Payment Icons is a simple Ruby on Rails engine extracted from Shopify. Shopify supports multiple payment methods through gems like Active Merchant and Offsite Payments. This has lead to an accumulation of icons for various payment methods. This gem provides easy access to those icons and helpful methods to integrate them into any Ruby on Rails app.

Usage

From Git

You can check out the latest source from git:

git clone https://github.com/activemerchant/payment_icons.git

From RubyGems

Installation from RubyGems: Run gem install payment_icons in your console.

If you'd like to add it to your existing Rails project, include gem 'payment_icons' in your Gemfile and run bundle install.

Once the gem is part of your Rails project, the PaymentIcon frozen record model will be available anywhere in your application. You also have access to all the icons with the path app/assets/images/payment_icons/<icon_name.svg>. For example:

<% PaymentIcon.credit_cards.each do |card| %>
  <div>
    <%= image_tag card.path %>
  </div>
<% end %>

Contributing

If you'd like to add a new payment method icon to this repository,

  1. [Fork it] (https://github.com/activemerchant/payment_icons/fork) and clone it.
  2. Create a branch (git checkout -b my_new_icon)
  3. Add your-icon.svg to the app/assets/images/payment_icons/ directory with the following specifications:
  • 38 by 24 pixels
  • Solid white background
  1. Edit db/payment_icons.yml file with the name, label and group of your icon. Valid group options are credit_cards, cryptocurrencies, wallets, bank_transfers, convenience_stores, and other.
  2. Push your changes to your fork (git push origin my_new_icon)
  3. Open a pull request and one of our maintainers will review it.
The trademarks and trade names provided in this library are those of their respective owners.

About

An easy to use library that allows you to manage and access payment icons

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 70.4%
  • HTML 26.5%
  • CSS 3.0%
  • JavaScript 0.1%