paypal-express 0.4.7 → 0.5.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paypal-express (0.4.6)
4
+ paypal-express (0.5.0.alpha)
5
5
  activesupport (>= 2.3)
6
6
  attr_required (>= 0.0.5)
7
7
  i18n
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: http://rubygems.org/
12
12
  specs:
13
- activesupport (3.2.2)
13
+ activesupport (3.2.3)
14
14
  i18n (~> 0.6)
15
15
  multi_json (~> 1.0)
16
16
  attr_required (0.0.5)
@@ -27,7 +27,7 @@ GEM
27
27
  jruby-openssl (0.7.6.1)
28
28
  bouncy-castle-java (>= 1.5.0146.1)
29
29
  mime-types (1.18)
30
- multi_json (1.1.0)
30
+ multi_json (1.3.2)
31
31
  rake (0.9.2.2)
32
32
  rest-client (1.6.7)
33
33
  mime-types (>= 1.16)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.7
1
+ 0.5.0.alpha
data/lib/paypal.rb CHANGED
@@ -6,7 +6,7 @@ require 'restclient_with_cert'
6
6
 
7
7
  module Paypal
8
8
 
9
- API_VERSION = '78.0'
9
+ API_VERSION = '88.0'
10
10
  ENDPOINT = {
11
11
  :production => 'https://www.paypal.com/cgi-bin/webscr',
12
12
  :sandbox => 'https://www.sandbox.paypal.com/cgi-bin/webscr'
@@ -1,7 +1,7 @@
1
1
  module Paypal
2
2
  module Payment
3
3
  class Request < Base
4
- attr_optional :action, :currency_code, :description, :notify_url, :billing_type, :billing_agreement_description, :billing_agreement_id
4
+ attr_optional :action, :currency_code, :description, :notify_url, :billing_type, :billing_agreement_description, :billing_agreement_id, :request_id, :seller_id
5
5
  attr_accessor :amount, :items
6
6
 
7
7
  def initialize(attributes = {})
@@ -34,7 +34,10 @@ module Paypal
34
34
  # recurring payment doesn't support dynamic notify_url.
35
35
  :"PAYMENTREQUEST_#{index}_NOTIFYURL" => self.notify_url,
36
36
  :"L_BILLINGTYPE#{index}" => self.billing_type,
37
- :"L_BILLINGAGREEMENTDESCRIPTION#{index}" => self.billing_agreement_description
37
+ :"L_BILLINGAGREEMENTDESCRIPTION#{index}" => self.billing_agreement_description,
38
+ # FOR PARALLEL PAYMENT
39
+ :"PAYMENTREQUEST_#{index}_PAYMENTREQUESTID" => self.request_id,
40
+ :"PAYMENTREQUEST_#{index}_SELLERPAYPALACCOUNTID" => self.seller_id
38
41
  }.delete_if do |k, v|
39
42
  v.blank?
40
43
  end
@@ -1,7 +1,7 @@
1
1
  module Paypal
2
2
  module Payment
3
3
  class Response < Base
4
- attr_accessor :amount, :ship_to, :description, :note, :items, :notify_url, :insurance_option_offered, :currency_code, :short_message, :long_message, :error_code, :severity_code, :ack, :transaction_id, :billing_agreement_id
4
+ attr_accessor :amount, :ship_to, :description, :note, :items, :notify_url, :insurance_option_offered, :currency_code, :short_message, :long_message, :error_code, :severity_code, :ack, :transaction_id, :billing_agreement_id, :request_id, :seller_id
5
5
 
6
6
  def initialize(attributes = {})
7
7
  attrs = attributes.dup
@@ -36,6 +36,8 @@ module Paypal
36
36
  @ack = attrs.delete(:ACK)
37
37
  @transaction_id = attrs.delete(:TRANSACTIONID)
38
38
  @billing_agreement_id = attrs.delete(:BILLINGAGREEMENTID)
39
+ @request_id = attrs.delete(:PAYMENTREQUESTID)
40
+ @seller_id = attrs.delete(:SELLERPAYPALACCOUNTID)
39
41
 
40
42
  # items
41
43
  items = []
@@ -17,6 +17,8 @@ module Paypal
17
17
  :SECUREMERCHANTACCOUNTID => :secure_merchant_account_id,
18
18
  :TRANSACTIONID => :transaction_id,
19
19
  :TRANSACTIONTYPE => :transaction_type,
20
+ :PAYMENTREQUESTID => :request_id,
21
+ :SELLERPAYPALACCOUNTID => :seller_id
20
22
  }
21
23
  attr_accessor *@@attribute_mapping.values
22
24
  attr_accessor :amount
@@ -23,7 +23,9 @@ describe Paypal::Payment::Response::Info do
23
23
  :FEEAMT => '0.85',
24
24
  :TAXAMT => '0.00',
25
25
  :RECEIPTID => '12345',
26
- :SECUREMERCHANTACCOUNTID => '123456789'
26
+ :SECUREMERCHANTACCOUNTID => '123456789',
27
+ :PAYMENTREQUESTID => '12345',
28
+ :SELLERPAYPALACCOUNTID => 'seller@shop.example.com'
27
29
  }
28
30
  end
29
31
 
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal-express
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
5
- prerelease:
4
+ version: 0.5.0.alpha
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - nov matake
@@ -13,7 +13,7 @@ date: 2012-05-04 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70106376919520 !ruby/object:Gem::Requirement
16
+ requirement: &70254812379860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70106376919520
24
+ version_requirements: *70254812379860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: i18n
27
- requirement: &70106376919040 !ruby/object:Gem::Requirement
27
+ requirement: &70254812379480 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70106376919040
35
+ version_requirements: *70254812379480
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: restclient_with_cert
38
- requirement: &70106376918580 !ruby/object:Gem::Requirement
38
+ requirement: &70254812379020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70106376918580
46
+ version_requirements: *70254812379020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: attr_required
49
- requirement: &70106376917940 !ruby/object:Gem::Requirement
49
+ requirement: &70254812378520 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.0.5
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70106376917940
57
+ version_requirements: *70254812378520
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &70106376917220 !ruby/object:Gem::Requirement
60
+ requirement: &70254812377960 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0.8'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70106376917220
68
+ version_requirements: *70254812377960
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: cover_me
71
- requirement: &70106376906320 !ruby/object:Gem::Requirement
71
+ requirement: &70254812377340 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.2.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70106376906320
79
+ version_requirements: *70254812377340
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &70106376905720 !ruby/object:Gem::Requirement
82
+ requirement: &70254812376760 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '2'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70106376905720
90
+ version_requirements: *70254812376760
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: fakeweb
93
- requirement: &70106376905060 !ruby/object:Gem::Requirement
93
+ requirement: &70254812376080 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: 1.3.0
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70106376905060
101
+ version_requirements: *70254812376080
102
102
  description: PayPal Express Checkout API Client for Instance, Recurring and Digital
103
103
  Goods Payment.
104
104
  email: nov@matake.jp