Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kikyous/boc_pay
ruby中行支付接口
https://github.com/kikyous/boc_pay
Last synced: about 2 months ago
JSON representation
ruby中行支付接口
- Host: GitHub
- URL: https://github.com/kikyous/boc_pay
- Owner: kikyous
- Created: 2014-05-15T08:20:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-23T07:41:24.000Z (over 10 years ago)
- Last Synced: 2023-03-23T08:14:41.332Z (almost 2 years ago)
- Language: Ruby
- Homepage:
- Size: 180 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.txt
Awesome Lists containing this project
README
# 获取支付form
@boc_form = Boc::Pay.new do |pay|
pay.orderNo = params[:orderId]
pay.orderAmount = params[:orderAmount].to_i / 100
pay.orderNote = '租车费'
end.get_form# 验证中行支付通知
# pay controller
# TYPE POST
def boc_notify
notify_params = params.except(*request.path_parameters.keys)verify = Boc::Notify.new(notify_params).verify
if verify
case params[:orderStatus]
when Boc::OrderStatus::Paid
# 支付成功,改变订单状态
else
# do nothing
end
end
end