GithubHelp home page GithubHelp logo

spree_alipay's Introduction

spree_alipay

Alipay for Spree

Now support 双功能收款 , 即时到账收款 和 担保交易收款。

Sample

  1. 2-0-stable http://spree-alipay-sample.herokuapp.com
  2. 2-2-stable http://spree-alipay-sample-220.herokuapp.com

Installation

  1. Add the following to your applications Gemfile

    gem 'spree_alipay', :github => "RuanShan/spree_alipay", :branch=>"2-0-stable"(or you perferred branch)

  2. Run bundler

    bundle install

  3. Copy and execute migrations:

rails g spree_alipay:install

rake railties:install:migrations #if you upgraded spree, run this command

rake db:migrate

Dependency

gem spree https://www.github.com/spree/spree

gem alipay https://www.github.com/chloerei/alipay

Notes

For Alipay 担保交易收款 "Escrow Account", use Spree::Gateway::AlipayEscrow this will redirect you to https://b.alipay.com/order/productDetail.htm?productId=2015110218011847

For Alipay 双功能收款 和 即时到账收, use Spree::Gateway::AlipayDirect, this will redirect you to https://b.alipay.com/order/productDetail.htm?productId=2015110218012942

Testing

  1. test
  bundle exec rake test_app
  rspec spec/feature/alipay_spec.rb
  1. manual test
  cd spec/dummy
  rake db:reset
  rake spree_sample:load

Reference

支付宝常见问题目录与索引——有助于您的问题能够快速解决

Alipay Official Doc

spree_alipay's People

Contributors

dgross881 avatar minmemory avatar qinghe avatar sitoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_alipay's Issues

It can't support spree 3.0

Bundler could not find compatible versions for gem "spree_core":
In Gemfile:
spree_auth_devise (>= 0) ruby depends on
spree_core (~> 3.0.0) ruby

spree_auth_devise (>= 0) ruby depends on
  spree_core (~> 3.0.0) ruby

spree (= 3.0.0) ruby depends on
  spree_core (= 3.0.0) ruby

spree_alipay (>= 0) ruby depends on
  spree_core (~> 2.2.0) ruby

How to set my notify_url, return_url ?

How to set my notify_url, return_url on alipay.com service site ?
Are they like return_url = alipay_api.mydomain.com/alipay_status/done/ and
notify_url = alipay_api.mydomain.com/alipay_status/notify/ ?

Spree 1.3.3 更新导致"undefined method #payment_method for Spree::Order"

Hi @RuanShan , Spree 1-3-stable分支的最新版本是1.3.3,经过升级,发现Spree::Order里边去除了payment以及payment_method这两个方法,导致所有涉及@order.payment以及@order.payment_method的代码都会报错,请注意更新spree_alipay中的相关代码,或者我稍后会提交针对此问题的PR。

** 相关链接 **
spree/spree#2785 (comment)
https://github.com/radar/spree/commit/f20cc4a21703ca754734d0d3b92199935df2f118

能够稍微解释一下使用方法吗?

我安装了这个Gem,在后台也配置了 parter_idkey,但是checkout的时候报下面的错误,我觉得是哪里没有配置对,能解释一下配置方法吗? 谢谢...

NoMethodError in Spree/checkout#alipay_checkout_payment

Showing 
~/workspace/spree_alipay/app/views/spree/checkout/alipay_checkout_payment.html.erb 
where line #1 raised:

undefined method `preferred_partner' for nil:NilClass
<% payment_service_for @order.number, @order.payment.preferred_partner,
                           :service => :alipay,
                           :html => { :id => 'payment-form', :method => :get } do |service| %>
 <% service.total_fee 0.02 %>

Request Parameter

{
    "payment_method_id"=>"931422121",
    "order_id"=>"R536570628"
}

这个怎么解决?

Bundler could not find compatible versions for gem "spree_core":
In snapshot (Gemfile.lock):
spree_core (= 3.6.4)

In Gemfile:
spree_alipay was resolved to 3.0.0, which depends on
spree_core (~> 3.0.0)

spree_auth_devise was resolved to 3.4.1, which depends on
  spree_core (< 4.0, >= 3.1.0)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.