activemerchant_patch_for_china 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{activemerchant_patch_for_china}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Richard Huang"]
|
12
|
-
s.date = %q{2009-11-
|
12
|
+
s.date = %q{2009-11-26}
|
13
13
|
s.description = %q{A rails plugin to add an active_merchant patch for china online payment platform}
|
14
14
|
s.email = %q{flyerhzm@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -6,32 +6,65 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
module Integrations #:nodoc:
|
7
7
|
module Alipay
|
8
8
|
class Helper < ActiveMerchant::Billing::Integrations::Helper
|
9
|
+
CREATE_DIRECT_PAY_BY_USER = 'create_direct_pay_by_user'
|
10
|
+
CREATE_PARTNER_TRADE_BY_BUYER = 'create_partner_trade_by_buyer'
|
11
|
+
TRADE_CREATE_BY_BUYER = 'trade_create_by_buyer'
|
12
|
+
|
13
|
+
###################################################
|
14
|
+
# common
|
15
|
+
###################################################
|
9
16
|
mapping :account, 'partner'
|
10
|
-
mapping :total_fee, 'total_fee'
|
11
|
-
mapping :price, 'price'
|
12
|
-
mapping :quantity, 'quantity'
|
13
|
-
|
14
17
|
mapping :order, 'out_trade_no'
|
15
|
-
|
16
18
|
mapping :seller, :email => 'seller_email',
|
17
19
|
:id => 'seller_id'
|
18
20
|
mapping :buyer, :email => 'buyer_email',
|
19
21
|
:id => 'buyer_id'
|
20
|
-
|
21
22
|
mapping :notify_url, 'notify_url'
|
22
23
|
mapping :return_url, 'return_url'
|
23
24
|
mapping :show_url, 'show_url'
|
24
25
|
mapping :body, 'body'
|
25
26
|
mapping :subject, 'subject'
|
26
|
-
|
27
27
|
mapping :charset, '_input_charset'
|
28
28
|
mapping :service, 'service'
|
29
29
|
mapping :payment_type, 'payment_type'
|
30
|
+
|
31
|
+
#################################################
|
32
|
+
# create direct pay by user
|
33
|
+
#################################################
|
34
|
+
mapping :total_fee, 'total_fee'
|
30
35
|
mapping :paymethod, 'paymethod'
|
31
36
|
mapping :defaultbank, 'defaultbank'
|
32
|
-
mapping :
|
33
|
-
|
37
|
+
mapping :royalty, :type => 'royalty_type',
|
38
|
+
:parameters => 'royalty_parameters'
|
34
39
|
mapping :it_b_pay, 'it_b_pay'
|
40
|
+
|
41
|
+
#################################################
|
42
|
+
# create partner trade by buyer or trade create by user
|
43
|
+
#################################################
|
44
|
+
mapping :price, 'price'
|
45
|
+
mapping :quantity, 'quantity'
|
46
|
+
mapping :discount, 'discount'
|
47
|
+
['', '_1', '_2', '_3'].each do |postfix|
|
48
|
+
self.class_eval <<-EOF
|
49
|
+
mapping :logistics#{postfix}, :type => 'logistics_type#{postfix}',
|
50
|
+
:fee => 'logistics_fee#{postfix}',
|
51
|
+
:payment => 'logistics_payment#{postfix}'
|
52
|
+
EOF
|
53
|
+
end
|
54
|
+
mapping :receive, :name => 'receive_name',
|
55
|
+
:address => 'receive_address',
|
56
|
+
:zip => 'receive_zip',
|
57
|
+
:phone => 'receive_phone',
|
58
|
+
:mobile => 'receive_mobile'
|
59
|
+
mapping :t_b_pay, 't_b_pay'
|
60
|
+
mapping :t_s_send_1, 't_s_send_1'
|
61
|
+
mapping :t_s_send_2, 't_s_send_2'
|
62
|
+
|
63
|
+
#################################################
|
64
|
+
# create partner trade by buyer
|
65
|
+
#################################################
|
66
|
+
mapping :agent, 'agent'
|
67
|
+
mapping :buyer_msg, 'buyer_msg'
|
35
68
|
|
36
69
|
def initialize(order, account, options = {})
|
37
70
|
super
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemerchant_patch_for_china
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-26 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|