Skip to content

1c7/demo_ruby_on_rails_wechat_pay

Repository files navigation

Ruby on Rails 微信支付 Demo

代码需搭配文章使用: https://1c7.me/rails-wechat-pay-tutorial/

演示包含

  • 网页端 (或者说 PC 端) 扫二维码支付 (微信的术语叫 NATIVE 支付)

演示不包含

  • 小程序支付
  • 公众号/服务号的网页内支付
  • App支付
  • 退款
  • 发红包

注意

这个不是一部署就马上可以试的, 请搭配文章使用
因为微信支付的 appid, mch_id, key 很关键, 不能放在公开代码里

大致步骤是:

  1. 填写 appid, mch_id, key (具体填写位置会在博客里写清楚)
  2. 部署到线上, 域名应该是备案过的
  3. 去商户平台配置回调地址, 填写 http://你的域名/notify
  4. 然后就可以测试支付了

本 Demo 编写时间

2019年11月

About

Ruby on Rails 微信支付教程 (PC端二维码扫码) 请搭配文章使用

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published