Sha256: e2f23789c459ad5e525e4db505b8c52e98eb96f81dec32b9ec7b7d1d9068d585

Contents?: true

Size: 1.02 KB

Versions: 9

Compression:

Stored size: 1.02 KB

Contents

[![Build Status](https://travis-ci.org/olownia/opay.png)](https://travis-ci.org/olownia/opay)

# Opay

Opay is a payu.pl payment provider for Rails apps.

## Installation

Add this to your Gemfile:

``` ruby
gem 'opay'
```

and run `bundle install`.

Next, run:

``` bash
# add an initializer to config/initializers with all of the configuration options
$ rails g opay:install
# This will add the necessary migrations to your app's db/migrate directory
rake opay:install:migrations
# This will run any pending migrations
rake db:migrate
```
then add the following to your routes.rb file:

``` ruby
# config/routes.rb
mount Opay::Engine => '/opay'
```

declare which of your models recive payments

``` ruby
class ModelName < ActiveRecord::Base
  include Opay::Payable
end
```

create payment form

``` haml
= opay_form_for(@model_name) do |f|
  = f.payment_info first_name: 'Jan', last_name: 'Kowalski', email: 'kowalski@gmail.com', desc: 'Payment description'
  = f.submit 'pay with payu'
```

set up online url in payu.pl to: `/opay/payu/online`

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
opay-1.2.0 README.md
opay-1.1.6 README.md
opay-1.1.5 README.md
opay-1.1.4 README.md
opay-1.1.3 README.md
opay-1.1.2 README.md
opay-1.1.1 README.md
opay-1.1.0 README.md
opay-1.0.9 README.md