activemerchant_patch_for_china 0.1.6 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2e12af86b3b2483ab617db966df6bc11a6eff09d
4
+ data.tar.gz: fb80be361fcfaf525f5bc58b0c7b48e7395fa84b
5
+ SHA512:
6
+ metadata.gz: b8cc13dadc303fb412f2791ff8f912c98b40444d92ba9ca536c37f4700f97479802a129b38bae836f6b78ead53b166f6a7c675a338bd6bc32f02fc18d5a96930
7
+ data.tar.gz: c9f87028ae4b2c031a1b5c0649154c524466fecd9cdbcda76a4ae2f3ffe4de9533b0911f49e021095f2f2cca541f5a471069a3dc5dd50b7b379c2a522520457a
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rake'
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 - 2010 [Richard Huang]
1
+ Copyright (c) 2009 - 2013 Richard Huang (flyerhzm@gmail.com)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.textile CHANGED
@@ -2,7 +2,12 @@ h1. activemerchant_patch_for_china
2
2
 
3
3
  This plugin is an active_merchant patch for china online payment platform, now it supports alipay (支付宝), 99bill (快钱), tenpay (财付通), 19pay(捷迅支付) and yeepay(易宝).
4
4
 
5
- <a href='http://www.pledgie.com/campaigns/14062'><img alt='Click here to lend your support to: activemerchant patch for china and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/14062.png?skin_name=chrome' border='0' /></a>
5
+ *************************************************************************
6
+
7
+ h2. Donate
8
+
9
+ "Alipay":http://me.alipay.com/flyerhzm
10
+ "Pledgie":http://www.pledgie.com/campaigns/14062
6
11
 
7
12
  **************************************************************************
8
13
 
@@ -18,8 +23,8 @@ script/plugin install git://github.com/flyerhzm/activemerchant_patch_for_china.g
18
23
  install activemerchant and activemerchant_patch_for_china as gems:
19
24
 
20
25
  <pre><code>
21
- sudo gem install activemerchant
22
- sudo gem install activemerchant_patch_for_china
26
+ gem install activemerchant
27
+ gem install activemerchant_patch_for_china
23
28
  </code></pre>
24
29
 
25
30
  **************************************************************************
@@ -60,4 +65,4 @@ h2. About
60
65
  **************************************************************************
61
66
 
62
67
 
63
- Copyright (c) 2009 - 2010 [Richard Huang], released under the MIT license
68
+ Copyright (c) 2009 - 2012 [Richard Huang], released under the MIT license
data/Rakefile CHANGED
@@ -1,7 +1,10 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'rake/rdoctask'
4
- require 'jeweler'
1
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
2
+ require "bundler"
3
+ Bundler.setup
4
+
5
+ require "rake"
6
+ require "rdoc/task"
7
+ require "rake/testtask"
5
8
 
6
9
  desc 'Default: run unit tests.'
7
10
  task :default => :test
@@ -23,13 +26,21 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
23
26
  rdoc.rdoc_files.include('lib/**/*.rb')
24
27
  end
25
28
 
26
- Jeweler::Tasks.new do |gemspec|
27
- gemspec.name = "activemerchant_patch_for_china"
28
- gemspec.summary = "A rails plugin to add an active_merchant patch for china online payment platform"
29
- gemspec.description = "A rails plugin to add an active_merchant patch for china online payment platform"
30
- gemspec.email = "flyerhzm@gmail.com"
31
- gemspec.homepage = "http://github.com/flyerhzm/activemerchant_patch_for_china"
32
- gemspec.authors = ["Richard Huang"]
33
- gemspec.add_dependency 'activemerchant', '>= 1.4.2'
29
+ require "activemerchant_patch_for_china/version"
30
+
31
+ task :build do
32
+ system "gem build activemerchant_patch_for_china.gemspec"
33
+ end
34
+
35
+ task :install => :build do
36
+ system "sudo gem install activemerchant_patch_for_china-#{ActivemerchantPatchForChina::VERSION}.gem"
37
+ end
38
+
39
+ task :release => :build do
40
+ puts "Tagging #{ActivemerchantPatchForChina::VERSION}..."
41
+ system "git tag -a #{ActivemerchantPatchForChina::VERSION} -m 'Tagging #{ActivemerchantPatchForChina::VERSION}'"
42
+ puts "Pushing to Github..."
43
+ system "git push --tags"
44
+ puts "Pushing to rubygems.org..."
45
+ system "gem push activemerchant_patch_for_china-#{ActivemerchantPatchForChina::VERSION}.gem"
34
46
  end
35
- Jeweler::GemcutterTasks.new
@@ -1,75 +1,21 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ lib = File.expand_path('../lib/', __FILE__)
2
+ $:.unshift lib unless $:.include?(lib)
5
3
 
6
- Gem::Specification.new do |s|
7
- s.name = %q{activemerchant_patch_for_china}
8
- s.version = "0.1.6"
4
+ require "activemerchant_patch_for_china/version"
9
5
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Richard Huang"]
12
- s.date = %q{2011-02-24}
13
- s.description = %q{A rails plugin to add an active_merchant patch for china online payment platform}
14
- s.email = %q{flyerhzm@gmail.com}
15
- s.extra_rdoc_files = [
16
- "README.textile"
17
- ]
18
- s.files = [
19
- "MIT-LICENSE",
20
- "README.textile",
21
- "Rakefile",
22
- "VERSION",
23
- "activemerchant_patch_for_china.gemspec",
24
- "init.rb",
25
- "lib/active_merchant/billing/integrations/alipay.rb",
26
- "lib/active_merchant/billing/integrations/alipay/helper.rb",
27
- "lib/active_merchant/billing/integrations/alipay/notification.rb",
28
- "lib/active_merchant/billing/integrations/alipay/return.rb",
29
- "lib/active_merchant/billing/integrations/alipay/sign.rb",
30
- "lib/active_merchant/billing/integrations/bill99.rb",
31
- "lib/active_merchant/billing/integrations/bill99/helper.rb",
32
- "lib/active_merchant/billing/integrations/bill99/notification.rb",
33
- "lib/active_merchant/billing/integrations/bill99/return.rb",
34
- "lib/active_merchant/billing/integrations/bill99_card.rb",
35
- "lib/active_merchant/billing/integrations/bill99_card/helper.rb",
36
- "lib/active_merchant/billing/integrations/bill99_card/notification.rb",
37
- "lib/active_merchant/billing/integrations/bill99_card/return.rb",
38
- "lib/active_merchant/billing/integrations/pay19.rb",
39
- "lib/active_merchant/billing/integrations/pay19/helper.rb",
40
- "lib/active_merchant/billing/integrations/pay19/notification.rb",
41
- "lib/active_merchant/billing/integrations/pay19/return.rb",
42
- "lib/active_merchant/billing/integrations/tenpay.rb",
43
- "lib/active_merchant/billing/integrations/tenpay/helper.rb",
44
- "lib/active_merchant/billing/integrations/tenpay/return.rb",
45
- "lib/active_merchant/billing/integrations/yeepay.rb",
46
- "lib/active_merchant/billing/integrations/yeepay/helper.rb",
47
- "lib/active_merchant/billing/integrations/yeepay/notification.rb",
48
- "lib/active_merchant/billing/integrations/yeepay/return.rb",
49
- "lib/activemerchant_patch_for_china.rb",
50
- "lib/integrations_helper.rb",
51
- "test/activemerchant_patch_for_china_test.rb",
52
- "test/test_helper.rb"
53
- ]
54
- s.homepage = %q{http://github.com/flyerhzm/activemerchant_patch_for_china}
6
+ Gem::Specification.new do |s|
7
+ s.name = "activemerchant_patch_for_china"
8
+ s.version = ActivemerchantPatchForChina::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ["Richard Huang"]
11
+ s.email = ["flyerhzm@gmail.com"]
12
+ s.homepage = "http://github.com/flyerhzm/activemerchant_patch_for_china"
13
+ s.summary = "A rails plugin to add an active_merchant patch for china online payment platform"
14
+ s.description = "A rails plugin to add an active_merchant patch for china online payment platform"
15
+ s.required_rubygems_version = ">= 1.3.6"
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
55
18
  s.require_paths = ["lib"]
56
- s.rubygems_version = %q{1.5.2}
57
- s.summary = %q{A rails plugin to add an active_merchant patch for china online payment platform}
58
- s.test_files = [
59
- "test/activemerchant_patch_for_china_test.rb",
60
- "test/test_helper.rb"
61
- ]
62
19
 
63
- if s.respond_to? :specification_version then
64
- s.specification_version = 3
65
-
66
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
67
- s.add_runtime_dependency(%q<activemerchant>, [">= 1.4.2"])
68
- else
69
- s.add_dependency(%q<activemerchant>, [">= 1.4.2"])
70
- end
71
- else
72
- s.add_dependency(%q<activemerchant>, [">= 1.4.2"])
73
- end
20
+ s.add_development_dependency "activesupport"
74
21
  end
75
-
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
8
8
  module Alipay
9
9
 
10
10
  mattr_accessor :service_url
11
- self.service_url = 'https://www.alipay.com/cooperate/gateway.do'
11
+ self.service_url = 'https://mapi.alipay.com/gateway.do'
12
12
 
13
13
  def self.notification(post)
14
14
  Notification.new(post)
@@ -9,6 +9,7 @@ module ActiveMerchant #:nodoc:
9
9
  CREATE_DIRECT_PAY_BY_USER = 'create_direct_pay_by_user'
10
10
  CREATE_PARTNER_TRADE_BY_BUYER = 'create_partner_trade_by_buyer'
11
11
  TRADE_CREATE_BY_BUYER = 'trade_create_by_buyer'
12
+ CREATE_FOREIGN_TRADE = 'create_forex_trade'
12
13
 
13
14
  ###################################################
14
15
  # common
@@ -28,6 +29,7 @@ module ActiveMerchant #:nodoc:
28
29
  mapping :service, 'service'
29
30
  mapping :payment_type, 'payment_type'
30
31
  mapping :extra_common_param, 'extra_common_param'
32
+ mapping :currency, 'currency'
31
33
 
32
34
  #################################################
33
35
  # create direct pay by user
@@ -74,7 +74,7 @@ module ActiveMerchant #:nodoc:
74
74
  @raw = post
75
75
  for line in post.split('&')
76
76
  key, value = *line.scan( %r{^(\w+)\=(.*)$} ).flatten
77
- params[key] = value
77
+ params[key] = CGI.unescape(value || '')
78
78
  end
79
79
  end
80
80
  end
File without changes
File without changes
@@ -15,7 +15,7 @@ module ActiveMerchant #:nodoc:
15
15
  mapping :channel, 'pd_FrpId'
16
16
 
17
17
  def initialize(order, account, options = {})
18
- super(order, ACCOUNT, options)
18
+ super(order, account, options)
19
19
  add_field('p0_Cmd', 'Buy')
20
20
  end
21
21
 
@@ -1,5 +1,9 @@
1
1
  # ActivemerchantPatchForChina
2
+ require 'activemerchant_patch_for_china/version'
2
3
  require 'integrations_helper'
3
4
  require 'active_merchant/billing/integrations/alipay'
4
5
  require 'active_merchant/billing/integrations/bill99'
6
+ require 'active_merchant/billing/integrations/bill99_card'
5
7
  require 'active_merchant/billing/integrations/tenpay'
8
+ require 'active_merchant/billing/integrations/pay19'
9
+ require 'active_merchant/billing/integrations/yeepay'
@@ -0,0 +1,3 @@
1
+ module ActivemerchantPatchForChina
2
+ VERSION = "0.2.0"
3
+ end
metadata CHANGED
@@ -1,52 +1,42 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: activemerchant_patch_for_china
3
- version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 6
10
- version: 0.1.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Richard Huang
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2011-02-24 00:00:00 +08:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: activemerchant
11
+ date: 2013-03-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
23
21
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 1
32
- - 4
33
- - 2
34
- version: 1.4.2
35
- type: :runtime
36
- version_requirements: *id001
37
- description: A rails plugin to add an active_merchant patch for china online payment platform
38
- email: flyerhzm@gmail.com
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: A rails plugin to add an active_merchant patch for china online payment
28
+ platform
29
+ email:
30
+ - flyerhzm@gmail.com
39
31
  executables: []
40
-
41
32
  extensions: []
42
-
43
- extra_rdoc_files:
44
- - README.textile
45
- files:
33
+ extra_rdoc_files: []
34
+ files:
35
+ - .gitignore
36
+ - Gemfile
46
37
  - MIT-LICENSE
47
38
  - README.textile
48
39
  - Rakefile
49
- - VERSION
50
40
  - activemerchant_patch_for_china.gemspec
51
41
  - init.rb
52
42
  - lib/active_merchant/billing/integrations/alipay.rb
@@ -74,43 +64,33 @@ files:
74
64
  - lib/active_merchant/billing/integrations/yeepay/notification.rb
75
65
  - lib/active_merchant/billing/integrations/yeepay/return.rb
76
66
  - lib/activemerchant_patch_for_china.rb
67
+ - lib/activemerchant_patch_for_china/version.rb
77
68
  - lib/integrations_helper.rb
78
69
  - test/activemerchant_patch_for_china_test.rb
79
70
  - test/test_helper.rb
80
- has_rdoc: true
81
71
  homepage: http://github.com/flyerhzm/activemerchant_patch_for_china
82
72
  licenses: []
83
-
73
+ metadata: {}
84
74
  post_install_message:
85
75
  rdoc_options: []
86
-
87
- require_paths:
76
+ require_paths:
88
77
  - lib
89
- required_ruby_version: !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- hash: 3
95
- segments:
96
- - 0
97
- version: "0"
98
- required_rubygems_version: !ruby/object:Gem::Requirement
99
- none: false
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- hash: 3
104
- segments:
105
- - 0
106
- version: "0"
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - '>='
86
+ - !ruby/object:Gem::Version
87
+ version: 1.3.6
107
88
  requirements: []
108
-
109
89
  rubyforge_project:
110
- rubygems_version: 1.5.2
90
+ rubygems_version: 2.0.0
111
91
  signing_key:
112
- specification_version: 3
92
+ specification_version: 4
113
93
  summary: A rails plugin to add an active_merchant patch for china online payment platform
114
- test_files:
94
+ test_files:
115
95
  - test/activemerchant_patch_for_china_test.rb
116
96
  - test/test_helper.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.6