
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
h1. 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.
h2. Installation
If your are using a Gemfile add the following line and run the bundle command.
gem "puntopagos"
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"
h2. Sample Usage
h3. Create a Transaction and Redirect to process url
trx_id = 'UNIQUE-TRACKING-ID' # Number as a string amount = '1000.00' # Number as a string with two decimals payment_method = 'some number' # Optional parameter (see PuntoPagos documentation) req = PuntoPagos::Request.new() resp = req.create(trx_id, amount, payment_method) if (resp.success?) redirect_to resp.payment_process_url end
h3. Verify notification sent by PuntoPagos
# Action where PuntoPagos it's gonna post
def action
notification = PuntoPagos::Notification.new
# This methods requires the headers as a hash and the params object as a hash
notification.valid? headers, params
end
h3. Check status of a transaction
status = PuntoPagos::Status.new status.check token, trx_id, amount status.valid? # if there's an error you can call status.error
h2. Test Data
|Gateway|Payload|Expected Result| |Transbank|Visa / 4051885600446623 / CVV: 123 / exp: any|Success| |Transbank|Mastercard / 5186059559590568 / CVV: 123 / exp: any|Failure|
h2. TODO
h2. Credits
Ignacio Mella & Gert Findel
h2. Special Thanks
Thanks to dvinales for not suing us.
FAQs
Unknown package
We found that puntopagos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.