0.01
Low commit activity in last 3 years
No release in over a year
Helpers to use iPizza inside Rails applications
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 2.9.0

Runtime

>= 2.1.0
 Project Readme

Adds iPizza support to Rails 3+ applications. Provides rails generators and easy configuration loading.

Read more about supported providers and configuration options form ipizza gem hompage.

Installation

In your Gemfile add ipizza-rails gem:

gem ipizza-rails

Usage

To start using iPizza in your rails application, you need to run the init generator first:

rails generate ipizza:init

This will create an example configuration file to config/ipizza.yml and create config/certificates directory and puts some test certificates into it.

View helpers

It is very convenient to put together form that will be submitted for payment request to payment provider with allthemighty ipizza_form_for view helper.

In your controller, perhaps, declare payment object:

@payment = Ipizza::Payment.new(
  :stamp => 123456, :amount => '15.00', :refnum => 1, :message => 'For all the candy', :currency => 'EUR'
)

And in view file, generate form for Swedbank, for example:

<%= ipizza_payment_form_tag @payment, :service => :swedbank do %>
  <%= submit_tag 'Pay some moneys' %>
<% end %>

TODO:

  • Implement form helpers