<img src=“https://travis-ci.org/friendlyfashion/dotpay.png” />
dotpay.pl gem provides tools for working with dotpay.pl online payments system
Start by configuring Dotpay:
Dotpay.configure do |config| config.account_id = 1234 config.pin = 'your URLC pin here' end
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
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)