Project

dotpay

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Online payments using dotpay.pl
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

dotpay.pl gem¶ ↑

<img src=“https://travis-ci.org/friendlyfashion/dotpay.png” />

Description¶ ↑

dotpay.pl gem provides tools for working with dotpay.pl online payments system

How to use¶ ↑

Start by configuring Dotpay:

Dotpay.configure do |config|
  config.account_id           = 1234
  config.pin                  = 'your URLC pin here'
end

Authorizing URLC callback¶ ↑

Sample URLC callback handling action.

def callback
  response = Dotpay::Response.new(params)

  if response.authorized?
    if response.status_done?
      # process your order
    end

    render :text => 'OK', :layout => false
  else
    render :text => 'ERROR', :layout => false
  end
end

Cancelling transaction using cancel API¶ ↑

You can cancel existing transaction:

Dotpay.cancel_transaction(t_id, amount, control)

Also you can do partial refund:

Dotpay.cancel_transaction(t_id, amount, control, type: 2)