• Stars
    star
    347
  • Rank 118,247 (Top 3 %)
  • Language
    Ruby
  • Created over 8 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WeChat web app with wx_pay in rails

wechat-starter

Build Status Code Climate

Template for developing wechat in rails.

Features

Screenshots

Demo

Service account sponsored by Le Wagon Shanghai

Install

See wiki first

Deploy to Heroku

Deploy

Deploy to your own server

  • Requirements

    • PostgreSQL

    • Configure "服务器地址" as http://your-domain.com/wechat

    • Configure "测试授权目录" as http://your-domain.com/

  • Install

    • Create your new project and add this repo as template

      mkdir your_app
      cd your_app
      git init
      git remote add template https://github.com/Eric-Guo/wechat-starter.git
      git fetch template
      git checkout -b master template/master
      bundle install
      rake db:create
      rake db:migrate
    • Create config/application.yml and config following information:

      wechat_app_id: "AppID"
      wechat_secret: "AppSecret"
      wechat_token:  "Token"
      wechat_encoding_aes_key: "EncodingAESKey"
      wechat_trusted_domain_fullname: "http://your_dev.proxy.qqbrowser.cc"
      
      # following is optional if you don't need wechat pay
      wechat_pay_mch_id: "merchant id"
      wechat_pay_api_key: "32 bits api key configured in pay.weixin.qq.com"
      wechat_pay_notify_url: "url to accept pay result notification"
    • Start server

      puma -C config/puma.rb

Create customized menu

It depends on Rails.env to choose the menu from config folder.

For example, if Rails.env == production, then config/menu_production.yaml is chosed.

# create menu
rake wechat:menu_create

# show menu
rake wechat:menu

References

Extension projects

  • rails authentication system
    • wechat omniauth only login
    • requires phone and email to login the system
    • phone confirmation service using yunpian
    • I18n internationalization (default locale is zh-CN)
    • rpsec test and simplecov test coverage (97.2% LOC covered)

Contributors

More Repositories

1

wechat

API, command and message handling for WeChat in Rails
Ruby
1,300
star
2

weui-rails

An UI library for WeChat, includes widgets/modules in mobile web app.
Ruby
142
star
3

where-or

Where or function backport from Rails 5 for Rails 4.2
Ruby
115
star
4

bootstrap-rails-startup-site

Rails 3.2.17 or 4.0.3 enterprise startup site based on Bootstrap 2.3 or 3
Ruby
34
star
5

tailwindcss-jit-stimulus

A template with Rails 7.0, Webpacker 6.0, TailwindCSS 3 and Stimulus 3.0
Ruby
18
star
6

rmmseg-cpp-new

an re-implementation of rmmseg (Chinese word segmentation library for Ruby) in C++ in new rake-compiler
C++
16
star
7

ember-examples-with-cli

All Ember.js examples in one repos, switch branchs to run instead of time consuming npm install
JavaScript
15
star
8

dragon-ruby-play-ground

Ruby
9
star
9

pgac_demo

Rails 5 Action Cable chat room on Windows in PostgreSQL as backend
Ruby
8
star
10

vali-admin-rails

Starting using vali-admin, an Free Bootstrap 4 Admin Template in Rails 5.2
Ruby
8
star
11

react_on_rails-hacker-news

Hackernews client based on react_on_rails for "The Road to learn React"
Ruby
8
star
12

coreui4-rails-starter

The CoreUI 4 Rails starter
Ruby
7
star
13

ipip-fast

Faster version of ipip-ipdb
Ruby
6
star
14

product_hunt

Demonstrate new Rails 5.1 feature: Assets on Yarn, System tests with Capybara and unified form_with method
Ruby
6
star
15

sublime-user-folder

My Sublime Text 4 user folder content
5
star
16

attr_accessible2strong_params

Automatically convert Rails 3 attr_accessible to Rails 4 Strong Parameter
Ruby
5
star
17

homebrew-qt55

Add back the removed [email protected] original in homebrew-core
Ruby
5
star
18

the-react-way-in-blog

React 进阶之路 Blog 实现
JavaScript
5
star
19

openresty-under-rails

Minimize development time & running time using Openresty under Rails
5
star
20

pl-form

PaperLess Form let you quickly generate hundred of forms in few lines
Ruby
4
star
21

jquery-dirtyforms-rails

Dirty Forms, A jQuery Plugin save you leaving filled forms in gems
Ruby
3
star
22

ember-bookstore-backend

Bookstore API backend in Rails 4.2
Ruby
2
star
23

XdHacks-SH-2019

Ruby
2
star
24

jquery-FixedHeaderTable-rails

Rails asset pipeline wrap for jQuery plugin for tables with fixed headers
Ruby
2
star
25

coreml_predict

Ruby gem change running predict using Apple CoreML Model 3 or later.
Ruby
1
star
26

shopify-rails5

Shopify test
Ruby
1
star
27

iGetui_server_csharp

An unofficial server side C# SDK improvement. http://dev.igetui.com/
C#
1
star
28

bitstarter

Stanford Startup Engineering course node.js app
JavaScript
1
star
29

hello_phoenix

Hello phoenix 1.4 master
Elixir
1
star
30

uo-mes

My last .NET Amateur MES, non-Camstar way to write a MES, code instead of config
C#
1
star
31

sublime2-user-folder

My Sublime Text 2 user folder content
Python
1
star
32

ember-hacker-news-backend

Backend for Ember Hacker News Clone, using Rails-API on 4.2
Ruby
1
star