Ruby Implementation of Transbank Webpay Integration Kit
Add this line to your application's Gemfile:
gem 'tbk-webpay', git: 'git@github.com:acidlabs/tbk-webpay.git'
And then execute:
$ bundle install
- Install in your project the e-commerce Connection Kit (KCC) from Transbank
- Follow the Transbank Webpay Integration manual to configure and set permissions to the directory tree and files.
- Serve your CGI scripts in your Web server
Set CGI URL and root path in config/tbk-webpay.yml
production:
cgi_base_url: "http://example.com/cgi"
tbk_root_path: "/home/deploy/example.com/cgi"
staging:
cgi_base_url: "http://staging.example.com/cgi"
tbk_root_path: "/home/deploy/staging.example.com/cgi"
Define private methods in Payment class, with your own application logic.
Finally, you need to create success and failure controllers and their views according to your application logic and frontend design.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request