payment demo design by francis
Ruby JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
lib
public
script
spec
vendor/plugins
wiki
.gitignore
.gitignore~
.rspec
.rvmrc
3rdPartyProvider_PayPal_Configuration.pdf
Gemfile
Gemfile.lock
How_to_test_by_spec.markdown~
PP_OrderMgmt_IntegrationGuide.pdf
README.markdown
Rakefile
Rakefile~
cbpayment_4.0_jsp.zip
chinabank.zip
config.ru
magpie.yml
paymentchina_apache_passenger.conf

README.markdown

PaymentChina


This Rails 3.1 app aims to demonstrate how simple it can be to integrate Twitter Bootstrap with Rails.

There is a demo here.

So far, the project uses the following resources:

Further details in this blog post.

Quick Start

make sure you are using ruby 1.9.2,you can controle ruby's version by rvm

  git clone git://github.com/jhjguxin/payment-china.git
  cd payment-china
  git checkout -b mypayment # Create a new work branch
  bundle install         # Install all the required gems

  cp config/database.example.yml config/database.yml
  # Edit config/payment-china.yml and config/database.yml to taste

  # Next step needs libxml2 and libxslt1 and their headers
  # On Debian-based systems: apt-get install libxml2-dev libxslt1-dev
  # On Mac OS X: no action required

  rake db:migrate
  rake db:seed

  or you can type "rake paymentchina:install" do this

https://github.com/flyerhzm/activemerchant_patch_for_china https://github.com/flyerhzm/donatecn

##Magpie用于模拟支付平台的沙盒功能

Magpie用于模拟支付平台的沙盒功能 magpie.yml文件用来配置你的商号信息, 假设你在支付宝(alipay)有个账号:123456, key是:aaabbb, 网银在线(chinabank) 有个账号:789789, key是:cccddd, 财付通(tenpay)有个账号:888666, key是:dddggg, 那么你在magpie.yml中这样写,

alipay:

  • ["123456", "aaabbb"]

chinabank:

  • ["paymentchina", "payment12315123"]

tenpay:

  • ["888666", "dddggg"]
sudo gem install rack

sudo gem install hpricot

sudo apt-get install mongrel

临时修改lib magpie server.rb 中 parse_options中

options = super 改为 options = default_options

##PayPal

https://developer.paypal.com/

充值,及时支付 wallet 余额, money 充值记录+1 金额,日期,备注 支付记录=1

交易记录trade 成功付款 未支付,一定时间自动,撤销 one trade n. association 商品 数目 支付单价 备注 totle

layout welcome hot category discount category

procuct

wallet

tradeinfo

当天,交易上限,单笔交易上限

FAQ

  1. According to Rails Tutorial, Ch.10: "only attr_accessible attributes can be assigned through mass assignment", i.e., by adding :admin => true to the initialization hash. You can do the User.create and then do user.toggle!(:admin) to set your particular user as an admin.
  2. No route matches “/users/sign_out” devise rails 3? signing out is a DELETE method. This means that your sign out link needs to look like this <%= link_to "Sign out", destroy_user_session_path, :method => :delete %>. Yours doesn't include the :method => :delete part.