v-may / spree_dotpay

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpreeDotpay

A Spree extension to allow payments using Dotpay.pl payment service.

Works with Rails 4.1 and Spree 2.4

Installation

  1. Add spree_dotpay to your Gemfile:
gem 'spree_dotpay'
  1. Bundle your dependencies:
  1. Copy the migrations in your app:

    bundle exec rake railties:install:migrations

  2. Run database migrations in your app:

    bundle exec rake db:migrate

  3. Restart your server

Configuration

In the admin backend go to "Configuration" -> "Payment Methods" section and then create new payment method:

  • select Spree::OffsitePayment::Dotpay as a provider;
  • enter your Dotpay account_id and pin;
  • in the server_ips field you can specify Dotpay server IPs separated by commas (see Dotpay manual)

Usage

A customer have 2 abilities to make a payment:

  • by pressing Dotpay link on the checkout payment page;
  • or in the usual manner: by pressing "save and continue" button on the checkout form. In this case the payment will be processed on the "confirm" step if it's present or on the "payment" step otherwise.

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_dotpay/factories'

TODO

Tests

Copyright (c) 2015 [name of extension creator], released under the New BSD License

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Ruby 95.2%Language:CSS 2.0%Language:JavaScript 2.0%Language:HTML 0.8%