Skip to content

imella/puntopagos-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PuntoPagos

This development is in a very early stage, please use it at your own risk and feel free to improve it and send Pull Requests.

Installation

If your are using a Gemfile add the following line and run the bundle command.

gem "puntopagos", :git => 'git://github.com/acidcl/puntopagos-ruby.git'

Create puntopagos.yml to your config folder:

development:
  environment:        "sandbox"
  puntopagos_key:     "YOUR-API-KEY"
  puntopagos_secret:  "YOUR-APP-SECRET"

test:
  environment:        "sandbox"
  puntopagos_key:     "YOUR-API-KEY"
  puntopagos_secret:  "YOUR-APP-SECRET"

production:
  environment:        "production"
  puntopagos_key:     "YOUR-API-KEY"
  puntopagos_secret:  "YOUR-APP-SECRET"

Sample Usage

	req = PuntoPagos::Request.new
	data = { 
		'trx_id' 	=> 'UNIQUE-TRACKING-ID',
		'monto'		=> '1000.00'
		#other gateway-specific parameter
		}
	
	resp = req.create(data)
	if (resp.success?)
	  redirect_to resp.payment_process_url
	end
	

Test Data

Gateway Payload Expected Result
Transbank Visa / 4051885600446623 / CVV: 123 / exp: any Success
Transbank Mastercard / 5186059559590568 / CVV: 123 / exp: any Failure

TODO

  • Config testing
  • Response testing
  • Functional testing
  • Documentation

Credits

Ignacio Mella & Gert Findel

Special Thanks

Thanks to dvinales for not suing us.

About

Wrapper for PuntoPagos API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published