paymentwall 1.0.2 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 896e8bc0169a0bf8b239c20cd18234ec99778ce1
4
- data.tar.gz: 0f9247445692318337eb0b488e0b94c3ff2488e5
3
+ metadata.gz: db81482b8f0955397680d17632e3729930673101
4
+ data.tar.gz: 72212c8ec5b5a7411c7bd8d5d4a946b573cc49e5
5
5
  SHA512:
6
- metadata.gz: c60ef08f45155361801b8e632e0e0434a5b43a517997756d656c75b954715214db2a3747de58bb13802aa3b65374eb22e7c278fc9ec5a3c5a20c00aed5d9922f
7
- data.tar.gz: fc4405a6374e4b226412e60d787f6b137754f18b4ca6ff45375ae0da6bf0569d757d2c39ed1e7d806e4844d786d2ccf6c12ed2ca56d023b2d0ec1f114dd4e1b6
6
+ metadata.gz: 8ff6563359a17dbe45db8c11775f0340c0588355c95f095e49aa16443f9356ef2a7e8ee4e8c9dcde0518653bba4761b0c0e4bccb8379dacdaa37298c7bc82859
7
+ data.tar.gz: 2ce1cdf2a90f69753440ece2a7e25c10feee7768351a7282bb3cb7b01dcc568ff7d1a453ef5a5f4130d529aab0ecee9ba0299129a6faa9cf4237e9a5a8060916
data/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2010-2014 Paymentwall, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2010-2014 Paymentwall, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,140 +1,187 @@
1
- #About Paymentwall
2
- [Paymentwall](http://paymentwall.com/?source=gh) is the leading digital payments platform for globally monetizing digital goods and services. Paymentwall assists game publishers, dating sites, rewards sites, SaaS companies and many other verticals to monetize their digital content and services.
3
- Merchants can plugin Paymentwall's API to accept payments from over 100 different methods including credit cards, debit cards, bank transfers, SMS/Mobile payments, prepaid cards, eWallets, landline payments and others.
4
-
5
- To sign up for a Paymentwall Merchant Account, [click here](http://paymentwall.com/signup/merchant?source=gh).
6
-
7
- #Paymentwall Ruby Library
8
- This library allows developers to use [Paymentwall APIs](http://paymentwall.com/en/documentation/API-Documentation/722?source=gh) (Virtual Currency, Digital Goods featuring recurring billing, and Virtual Cart).
9
-
10
- To use Paymentwall, all you need to do is to sign up for a Paymentwall Merchant Account so you can setup an Application designed for your site.
11
- To open your merchant account and set up an application, you can [sign up here](http://paymentwall.com/signup/merchant?source=gh).
12
-
13
- #Installation
14
- To install the library in your environment, you can download the [ZIP archive](https://github.com/paymentwall/paymentwall-ruby/archive/master.zip), unzip it and place into your project.
15
-
16
- Alternatively, you can run:
17
-
18
- <code>git clone git://github.com/paymentwall/paymentwall-ruby.git</code>
19
-
20
- Then use a code sample below.
21
-
22
- #Code Samples
23
-
24
- ##Digital Goods API
25
-
26
- ####Initializing Paymentwall
27
- <pre><code>require_relative '/path/to/paymentwall-ruby/lib/paymentwall.rb'
28
- Paymentwall::Base::setApiType(Paymentwall::Base::API_GOODS)
29
- Paymentwall::Base::setAppKey('YOUR_APPLICATION_KEY') # available in your Paymentwall merchant area
30
- Paymentwall::Base::setSecretKey('YOUR_SECRET_KEY') # available in your Paymentwall merchant area
31
- </code></pre>
32
-
33
- ####Widget Call
34
- [Web API details](http://www.paymentwall.com/en/documentation/Digital-Goods-API/710#paymentwall_widget_call_flexible_widget_call)
35
-
36
- The widget is a payment page hosted by Paymentwall that embeds the entire payment flow: selecting the payment method, completing the billing details, and providing customer support via the Help section. You can redirect the users to this page or embed it via iframe. Below is an example that renders an iframe with Paymentwall Widget.
37
-
38
- <pre><code>widget = Paymentwall::Widget.new(
39
- 'user40012', # id of the end-user who's making the payment
40
- 'p1_1', # widget code, e.g. p1; can be picked inside of your merchant account
41
- [ # product details for Flexible Widget Call. To let users select the product on Paymentwall's end, leave this array empty
42
- Paymentwall::Product.new(
43
- 'product301', # id of the product in your system
44
- 9.99, # price
45
- 'USD', # currency code
46
- 'Gold Membership', # product name
47
- Paymentwall::Product::TYPE_SUBSCRIPTION, # this is a time-based product
48
- 1, # duration is 1
49
- Paymentwall::Product::PERIOD_TYPE_MONTH, # month
50
- true # recurring
51
- )
52
- ],
53
- {'email' => 'user@hostname.com'} # additional parameters
54
- )
55
- puts widget.getHtmlCode()
56
- </code></pre>
57
-
58
- ####Pingback Processing
59
-
60
- The Pingback is a webhook notifying about a payment being made. Pingbacks are sent via HTTP/HTTPS to your servers. To process pingbacks use the following code:
61
- <pre><code>pingback = Paymentwall::Pingback.new(request_get_params, request_ip_address)
62
- if pingback.validate()
63
- productId = pingback.getProduct().getId()
64
- if pingback.isDeliverable()
65
- # deliver the product
66
- elsif pingback.isCancelable()
67
- # withdraw the product
68
- end
69
- puts 'OK' # Paymentwall expects response to be OK, otherwise the pingback will be resent
70
- else
71
- puts pingback.getErrorSummary()
72
- end</code></pre>
73
-
74
- ##Virtual Currency API
75
-
76
- ####Initializing Paymentwall
77
- <pre><code>require_relative '/path/to/paymentwall-ruby/lib/paymentwall.rb'
78
- Paymentwall::Base::setApiType(Paymentwall_Base::API_VC)
79
- Paymentwall::Base::setAppKey('YOUR_APPLICATION_KEY') # available in your Paymentwall merchant area
80
- Paymentwall::Base::setSecretKey('YOUR_SECRET_KEY') # available in your Paymentwall merchant area
81
- </code></pre>
82
-
83
- ####Widget Call
84
- <pre><code>widget = Paymentwall::Widget.new(
85
- 'user40012', # id of the end-user who's making the payment
86
- 'p1_1', # widget code, e.g. p1; can be picked inside of your merchant account
87
- [], # array of products - leave blank for Virtual Currency API
88
- {'email' => 'user@hostname.com'} # additional parameters
89
- )
90
- puts widget.getHtmlCode()
91
- </code></pre>
92
-
93
- ####Pingback Processing
94
- <pre><code>pingback = Paymentwall::Pingback.new(request_get_params, request_ip_address)
95
- if pingback.validate()
96
- virtualCurrency = pingback.getVirtualCurrencyAmount()
97
- if pingback.isDeliverable()
98
- # deliver the virtual currency
99
- elsif pingback.isCancelable()
100
- # withdraw the virual currency
101
- end
102
- puts 'OK' # Paymentwall expects response to be OK, otherwise the pingback will be resent
103
- else
104
- puts pingback.getErrorSummary()
105
- end</code></pre>
106
-
107
- ##Cart API
108
-
109
- ####Initializing Paymentwall
110
- <pre><code>require_relative '/path/to/paymentwall-ruby/lib/paymentwall.rb'
111
- Paymentwall::Base::setApiType(Paymentwall_Base::API_CART)
112
- Paymentwall::Base::setAppKey('YOUR_APPLICATION_KEY') # available in your Paymentwall merchant area
113
- Paymentwall::Base::setSecretKey('YOUR_SECRET_KEY') # available in your Paymentwall merchant area
114
- </code></pre>
115
-
116
- ####Widget Call
117
- <pre><code>widget = Paymentwall::Widget.new(
118
- 'user40012', # id of the end-user who's making the payment
119
- 'p1_1', # widget code, e.g. p1; can be picked inside of your merchant account,
120
- [
121
- Paymentwall::Product.new('product301', 3.33, 'EUR'), # first product in cart
122
- Paymentwall::Product.new('product607', 7.77, 'EUR') # second product in cart
123
- ],
124
- {'email' => 'user@hostname.com'} # additional params
125
- )
126
- puts widget.getHtmlCode()</code></pre>
127
-
128
- ####Pingback Processing
129
- <pre><code>pingback = Paymentwall::Pingback.new(request_get_params, request_ip_address)
130
- if pingback.validate()
131
- products = pingback.getProducts()
132
- if pingback.isDeliverable()
133
- # deliver the products
134
- elsif pingback.isCancelable()
135
- # withdraw the products
136
- end
137
- puts 'OK' # Paymentwall expects response to be OK, otherwise the pingback will be resent
138
- else
139
- puts pingback.getErrorSummary()
140
- end</code></pre>
1
+ # About Paymentwall
2
+
3
+ [Paymentwall](http://paymentwall.com/?source=gh) is the leading digital payments platform for globally monetizing digital goods and services. Paymentwall assists game publishers, dating sites, rewards sites, SaaS companies and many other verticals to monetize their digital content and services.
4
+ Merchants can plugin Paymentwall's API to accept payments from over 100 different methods including credit cards, debit cards, bank transfers, SMS/Mobile payments, prepaid cards, eWallets, landline payments and others.
5
+
6
+ To sign up for a Paymentwall Merchant Account, [click here](http://paymentwall.com/signup/merchant?source=gh).
7
+
8
+ # Paymentwall Ruby Library
9
+
10
+ This library allows developers to use [Paymentwall APIs](http://paymentwall.com/en/documentation/API-Documentation/722?source=gh) (Virtual Currency, Digital Goods featuring recurring billing, and Virtual Cart).
11
+
12
+ To use Paymentwall, all you need to do is to sign up for a Paymentwall Merchant Account so you can setup an Application designed for your site.
13
+ To open your merchant account and set up an application, you can [sign up here](http://paymentwall.com/signup/merchant?source=gh).
14
+
15
+ # Installation
16
+
17
+ ```
18
+ gem install paymentwall
19
+ ```
20
+
21
+ Alternatively, you can download the [ZIP archive](https://github.com/paymentwall/paymentwall-ruby/archive/master.zip), unzip it and place into your project.
22
+
23
+ Alternatively, you can run:
24
+
25
+ ```
26
+ git clone git://github.com/paymentwall/paymentwall-ruby.git
27
+ ```
28
+
29
+ Then use a code sample below.
30
+
31
+ # Code Samples
32
+
33
+ ## Digital Goods API
34
+
35
+ ### Initializing Paymentwall
36
+
37
+ ```rb
38
+ require 'paymentwall' # alternatively, require_relative '/path/to/paymentwall-ruby/lib/paymentwall.rb'
39
+ Paymentwall::Base::setApiType(Paymentwall::Base::API_GOODS)
40
+ Paymentwall::Base::setAppKey('YOUR_APPLICATION_KEY') # available in your Paymentwall merchant area
41
+ Paymentwall::Base::setSecretKey('YOUR_SECRET_KEY') # available in your Paymentwall merchant area
42
+ ```
43
+
44
+ ### Widget Call
45
+
46
+ [Web API details](http://www.paymentwall.com/en/documentation/Digital-Goods-API/710#paymentwall_widget_call_flexible_widget_call)
47
+
48
+ The widget is a payment page hosted by Paymentwall that embeds the entire payment flow: selecting the payment method, completing the billing details, and providing customer support via the Help section. You can redirect the users to this page or embed it via iframe. Below is an example that renders an iframe with Paymentwall Widget.
49
+
50
+ ```rb
51
+ widget = Paymentwall::Widget.new(
52
+ 'user40012', # id of the end-user who's making the payment
53
+ 'fp', # widget code, e.g. p1; can be picked inside of your merchant account
54
+ [ # product details for Flexible Widget Call. To let users select the product on Paymentwall's end, leave this array empty
55
+ Paymentwall::Product.new(
56
+ 'product301', # id of the product in your system
57
+ 9.99, # price
58
+ 'USD', # currency code
59
+ 'Gold Membership', # product name
60
+ Paymentwall::Product::TYPE_SUBSCRIPTION, # this is a time-based product
61
+ 1, # duration is 1
62
+ Paymentwall::Product::PERIOD_TYPE_MONTH, # month
63
+ true # recurring
64
+ )
65
+ ],
66
+ {'email' => 'user@hostname.com'} # additional parameters
67
+ )
68
+ puts widget.getHtmlCode()
69
+ ```
70
+
71
+ ### Pingback Processing
72
+
73
+ The Pingback is a webhook notifying about a payment being made. Pingbacks are sent via HTTP/HTTPS to your servers. To process pingbacks use the following code:
74
+
75
+ ```rb
76
+ pingback = Paymentwall::Pingback.new(request_get_params, request_ip_address)
77
+ if pingback.validate()
78
+ productId = pingback.getProduct().getId()
79
+ if pingback.isDeliverable()
80
+ # deliver the product
81
+ elsif pingback.isCancelable()
82
+ # withdraw the product
83
+ end
84
+ puts 'OK' # Paymentwall expects response to be OK, otherwise the pingback will be resent
85
+ else
86
+ puts pingback.getErrorSummary()
87
+ end
88
+ ```
89
+
90
+ ## Virtual Currency API
91
+
92
+ ### Initializing Paymentwall
93
+
94
+ ```rb
95
+ require_relative '/path/to/paymentwall-ruby/lib/paymentwall.rb'
96
+ Paymentwall::Base::setApiType(Paymentwall::Base::API_VC)
97
+ Paymentwall::Base::setAppKey('YOUR_APPLICATION_KEY') # available in your Paymentwall merchant area
98
+ Paymentwall::Base::setSecretKey('YOUR_SECRET_KEY') # available in your Paymentwall merchant area
99
+ ```
100
+
101
+ ### Widget Call
102
+
103
+ ```rb
104
+ widget = Paymentwall::Widget.new(
105
+ 'user40012', # id of the end-user who's making the payment
106
+ 'p1_1', # widget code, e.g. p1; can be picked inside of your merchant account
107
+ [], # array of products - leave blank for Virtual Currency API
108
+ {'email' => 'user@hostname.com'} # additional parameters
109
+ )
110
+ puts widget.getHtmlCode()
111
+ ```
112
+
113
+ ### Pingback Processing
114
+
115
+ ```rb
116
+ pingback = Paymentwall::Pingback.new(request_get_params, request_ip_address)
117
+ if pingback.validate()
118
+ virtualCurrency = pingback.getVirtualCurrencyAmount()
119
+ if pingback.isDeliverable()
120
+ # deliver the virtual currency
121
+ elsif pingback.isCancelable()
122
+ # withdraw the virual currency
123
+ end
124
+ puts 'OK' # Paymentwall expects response to be OK, otherwise the pingback will be resent
125
+ else
126
+ puts pingback.getErrorSummary()
127
+ end
128
+ ```
129
+
130
+ ## Cart API
131
+
132
+ ### Initializing Paymentwall
133
+
134
+ ```rb
135
+ require_relative '/path/to/paymentwall-ruby/lib/paymentwall.rb'
136
+ Paymentwall::Base::setApiType(Paymentwall::Base::API_CART)
137
+ Paymentwall::Base::setAppKey('YOUR_APPLICATION_KEY') # available in your Paymentwall merchant area
138
+ Paymentwall::Base::setSecretKey('YOUR_SECRET_KEY') # available in your Paymentwall merchant area
139
+ ```
140
+
141
+ ### Widget Call
142
+
143
+ ```rb
144
+ widget = Paymentwall::Widget.new(
145
+ 'user40012', # id of the end-user who's making the payment
146
+ 'p1_1', # widget code, e.g. p1; can be picked inside of your merchant account,
147
+ [
148
+ Paymentwall::Product.new('product301', 3.33, 'EUR'), # first product in cart
149
+ Paymentwall::Product.new('product607', 7.77, 'EUR') # second product in cart
150
+ ],
151
+ {'email' => 'user@hostname.com'} # additional params
152
+ )
153
+ puts widget.getHtmlCode()
154
+ ```
155
+
156
+ ### Pingback Processing
157
+
158
+ ```rb
159
+ pingback = Paymentwall::Pingback.new(request_get_params, request_ip_address)
160
+ if pingback.validate()
161
+ products = pingback.getProducts()
162
+ if pingback.isDeliverable()
163
+ # deliver the products
164
+ elsif pingback.isCancelable()
165
+ # withdraw the products
166
+ end
167
+ puts 'OK' # Paymentwall expects response to be OK, otherwise the pingback will be resent
168
+ else
169
+ puts pingback.getErrorSummary()
170
+ end
171
+ ```
172
+ # Testing this gem
173
+
174
+ To run this gem's test suite locally, follow the steps below.
175
+
176
+ ```
177
+ # Clone the repository
178
+ git clone git@github.com:paymentwall/paymentwall-ruby.git
179
+
180
+ # Install dependencies with Bundler
181
+ cd paymentwall-ruby
182
+ bundle install
183
+
184
+ # Run tests
185
+ rake
186
+ ```
187
+
@@ -0,0 +1,8 @@
1
+ require 'cucumber'
2
+ require 'cucumber/rake/task'
3
+
4
+ task default: [:features]
5
+
6
+ Cucumber::Rake::Task.new(:features) do |t|
7
+ t.cucumber_opts = "features --format pretty"
8
+ end
@@ -26,7 +26,7 @@ module Paymentwall
26
26
  end
27
27
 
28
28
  def self.getApiType
29
- @@apiType
29
+ @@apiType.to_i
30
30
  end
31
31
 
32
32
  def self.setAppKey(value)
@@ -35,7 +35,7 @@ module Paymentwall
35
35
  end
36
36
 
37
37
  def self.getAppKey
38
- @@appKey
38
+ @@appKey.to_s
39
39
  end
40
40
 
41
41
  def self.setSecretKey(value)
@@ -44,7 +44,7 @@ module Paymentwall
44
44
  end
45
45
 
46
46
  def self.getSecretKey
47
- @@secretKey
47
+ @@secretKey.to_s
48
48
  end
49
49
 
50
50
  def getErrors
@@ -4,6 +4,16 @@ module Paymentwall
4
4
  PINGBACK_TYPE_REGULAR = 0
5
5
  PINGBACK_TYPE_GOODWILL = 1
6
6
  PINGBACK_TYPE_NEGATIVE = 2
7
+
8
+ PINGBACK_TYPE_RISK_UNDER_REVIEW = 200
9
+ PINGBACK_TYPE_RISK_REVIEWED_ACCEPTED = 201
10
+ PINGBACK_TYPE_RISK_REVIEWED_DECLINED = 202
11
+
12
+ PINGBACK_TYPE_RISK_AUTHORIZATION_VOIDED = 203
13
+
14
+ PINGBACK_TYPE_SUBSCRIPTION_CANCELLED = 12
15
+ PINGBACK_TYPE_SUBSCRIPTION_EXPIRED = 13
16
+ PINGBACK_TYPE_SUBSCRIPTION_FAILED = 14
7
17
 
8
18
  def initialize(parameters = {}, ipAddress = '')
9
19
  @parameters = parameters
@@ -39,8 +49,6 @@ module Paymentwall
39
49
  signatureParams = Array['uid', 'goodsid', 'slength', 'speriod', 'type', 'ref']
40
50
  else
41
51
  signatureParams = Array['uid', 'goodsid', 'type', 'ref']
42
- @parameters['sign_version'] = self.class::SIGNATURE_VERSION_2
43
-
44
52
  end
45
53
 
46
54
  if !@parameters.include?('sign_version') || @parameters['sign_version'].to_i == self.class::SIGNATURE_VERSION_1
@@ -107,7 +115,14 @@ module Paymentwall
107
115
  pingbackTypes = [
108
116
  self.class::PINGBACK_TYPE_REGULAR,
109
117
  self.class::PINGBACK_TYPE_GOODWILL,
110
- self.class::PINGBACK_TYPE_NEGATIVE
118
+ self.class::PINGBACK_TYPE_NEGATIVE,
119
+ self.class::PINGBACK_TYPE_RISK_UNDER_REVIEW,
120
+ self.class::PINGBACK_TYPE_RISK_REVIEWED_ACCEPTED,
121
+ self.class::PINGBACK_TYPE_RISK_REVIEWED_DECLINED,
122
+ self.class::PINGBACK_TYPE_RISK_AUTHORIZATION_VOIDED,
123
+ self.class::PINGBACK_TYPE_SUBSCRIPTION_CANCELLED,
124
+ self.class::PINGBACK_TYPE_SUBSCRIPTION_EXPIRED,
125
+ self.class::PINGBACK_TYPE_SUBSCRIPTION_FAILED
111
126
  ]
112
127
 
113
128
  if @parameters.include?('type')
@@ -173,11 +188,18 @@ module Paymentwall
173
188
  end
174
189
 
175
190
  def isDeliverable()
176
- self.getType() == self.class::PINGBACK_TYPE_REGULAR || self.getType() == self.class::PINGBACK_TYPE_GOODWILL
191
+ self.getType() == self.class::PINGBACK_TYPE_REGULAR ||
192
+ self.getType() == self.class::PINGBACK_TYPE_GOODWILL ||
193
+ self.getType() == self.class::PINGBACK_TYPE_RISK_REVIEWED_ACCEPTED
177
194
  end
178
195
 
179
196
  def isCancelable()
180
- self.getType() == self.class::PINGBACK_TYPE_NEGATIVE
197
+ self.getType() == self.class::PINGBACK_TYPE_NEGATIVE ||
198
+ self.getType() == self.class::PINGBACK_TYPE_RISK_REVIEWED_DECLINED
199
+ end
200
+
201
+ def isUnderReview()
202
+ self.getType() == self.class::PINGBACK_TYPE_RISK_UNDER_REVIEW
181
203
  end
182
204
 
183
205
  protected
File without changes
@@ -3,7 +3,7 @@ module Paymentwall
3
3
 
4
4
  BASE_URL = 'https://api.paymentwall.com/api'
5
5
 
6
- def initialize(userId, widgetCode, products = array(), extraParams = {})
6
+ def initialize(userId, widgetCode, products = [], extraParams = {})
7
7
  @userId = userId
8
8
  @widgetCode = widgetCode
9
9
  @extraParams = extraParams
File without changes
metadata CHANGED
@@ -1,33 +1,101 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paymentwall
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - Paymentwall
7
+ - Heitor Dolinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-12 00:00:00.000000000 Z
12
- dependencies: []
13
- description: "This library allows developers to use Paymentwall APIs (Virtual Currency,
14
- Digital Goods featuring recurring billing, and Virtual Cart). \n To use Paymentwall,
15
- all you need to do is to sign up for a Paymentwall Merchant Account so you can setup
16
- an Application designed for your site. To open your merchant account and set up
17
- an application. See https://paymentwall.com for details."
18
- email: devsupport@paymentwall.com
11
+ date: 2017-06-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: cucumber
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: hpricot
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: uri-query_params
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Paymentwall is the leading digital payments platform for globally monetizing
84
+ digital goods and services.
85
+ email: heitor@paymentwall.com
19
86
  executables: []
20
87
  extensions: []
21
88
  extra_rdoc_files: []
22
89
  files:
23
90
  - LICENSE
24
91
  - README.md
92
+ - Rakefile
25
93
  - lib/Paymentwall/Base.rb
26
94
  - lib/Paymentwall/Pingback.rb
27
95
  - lib/Paymentwall/Product.rb
28
96
  - lib/Paymentwall/Widget.rb
29
97
  - lib/paymentwall.rb
30
- homepage: https://github.com/paymentwall/paymentwall-ruby
98
+ homepage: http://www.paymentwall.com
31
99
  licenses:
32
100
  - MIT
33
101
  metadata: {}
@@ -47,8 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
115
  version: '0'
48
116
  requirements: []
49
117
  rubyforge_project:
50
- rubygems_version: 2.0.14
118
+ rubygems_version: 2.6.12
51
119
  signing_key:
52
120
  specification_version: 4
53
- summary: Ruby library for use Paymentwall API!
121
+ summary: Paymentwall gem
54
122
  test_files: []