Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chinapay

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chinapay

  • 1.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Tencentpay

财付通SDK

Installation

Add this line to your application's Gemfile:

gem 'chinapay', :git => 'git://github.com/lg2046/chinapay.git

And then execute:

$ bundle or bundle update

Or install it yourself as:

$ gem install chinapay

Usage

充值:
@request = Chinapay.build_request(:alipay, //支持["alipay", "tenpay", "1002", "1038" 数字为财付通的网银直联代码]
                             '测试充值',
                             100, //人民币元为单位
                             'http://www.example.com/transactions/notify', //回调url
                             current_user.id.to_s, //附加数据
                             )
redirect_to @request.url

response = Chinapay.build_response(params)
if response
	response.successful?
	puts response.success_response(option_redirect_url)
end

充值成功后回调:
tencent_response = Tencentpay::Response.new(params)  tencent_response为一hash值 inspect即可

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 28 Feb 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc