Payonline
This is a thin wrapper library that makes using PayOnline API a bit easier.
Install / Use
/learn @SumatoSoft/PayonlineREADME
Payonline
This is a thin wrapper library that makes using PayOnline API a bit easier.
Installation
Add this line to your application's Gemfile:
gem 'payonline'
And then execute:
$ bundle
Configuring
Create an initializer: config/initializers/payonline.rb:
Payonline.config do |config|
config.merchant_id = '12345'
config.private_security_key = 'your-private-security-key'
config.return_url = 'https://example.com/payments/success'
config.fail_url = 'https://example.com/payments/fail'
end
Usage
Get payment URL:
Payonline::PaymentGateway.new(order_id: 1, amount: 2.0, currency: 'RUB').payment_url
Implement a callback action that will be called by PayOnline after a transaction is completed:
@response = Payonline::PaymentResponse.new(params)
if @response.valid_payment?
Order.find(@response.order_id).set_paid!
end
Contributing
- Fork it
- Clone it
git clone https://github.com/SumatoSoft/payonline - 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 through Github
Related Skills
node-connect
354.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
