offsite_payments 2.7.22 → 2.7.24
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.
- checksums.yaml +4 -4
- data/lib/offsite_payments/integrations/a1agregator.rb +0 -8
- data/lib/offsite_payments/integrations/bit_pay.rb +1 -1
- data/lib/offsite_payments/integrations/citrus.rb +2 -2
- data/lib/offsite_payments/integrations/direc_pay.rb +1 -1
- data/lib/offsite_payments/integrations/easy_pay.rb +1 -1
- data/lib/offsite_payments/integrations/epay.rb +2 -2
- data/lib/offsite_payments/integrations/gestpay.rb +1 -1
- data/lib/offsite_payments/integrations/liqpay.rb +2 -2
- data/lib/offsite_payments/integrations/mollie_ideal.rb +1 -1
- data/lib/offsite_payments/integrations/mollie_mistercash.rb +1 -1
- data/lib/offsite_payments/integrations/pag_seguro.rb +1 -1
- data/lib/offsite_payments/integrations/pay_fast.rb +1 -1
- data/lib/offsite_payments/integrations/payflow_link.rb +0 -4
- data/lib/offsite_payments/integrations/paytm.rb +2 -2
- data/lib/offsite_payments/integrations/payu_in.rb +3 -3
- data/lib/offsite_payments/integrations/platron.rb +1 -1
- data/lib/offsite_payments/integrations/realex_offsite.rb +0 -4
- data/lib/offsite_payments/integrations/sage_pay_form.rb +1 -0
- data/lib/offsite_payments/integrations/web_pay.rb +1 -1
- data/lib/offsite_payments/integrations/webmoney.rb +1 -1
- data/lib/offsite_payments/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3543bb9947e4536a4d25e2f6dc491ccfb5daabfcf83ce6d6bc440a6cb6576eed
|
4
|
+
data.tar.gz: c0cb5d70b1fc5d2606b4f407c668633233221880c6dc41a7b0a6e5e9c03524fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8225e42304353ea2a761e7fd2f7d851cb15090e0ec3b48cb6b3fd6bdc063f583596f55c80302594748ac9c4134e1c3dd9b16a196881d27b01a628a172510cfa5
|
7
|
+
data.tar.gz: f967016da8bb203b6f7f8f22b87fc346a45800bc3791c9839e5bc9bcdf39cfa84b53d59448c0770827df4d6588037b4ea54e7096f7378908079fc1957a2d55d1
|
@@ -93,14 +93,6 @@ module OffsitePayments #:nodoc:
|
|
93
93
|
params['type']
|
94
94
|
end
|
95
95
|
|
96
|
-
def partner_income
|
97
|
-
params['partner_income']
|
98
|
-
end
|
99
|
-
|
100
|
-
def system_income
|
101
|
-
params['system_income']
|
102
|
-
end
|
103
|
-
|
104
96
|
# Additional notification request params:
|
105
97
|
# tid
|
106
98
|
# name
|
@@ -119,7 +119,7 @@ module OffsitePayments
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def amount
|
122
|
-
Money.from_amount(BigDecimal
|
122
|
+
Money.from_amount(BigDecimal(gross), currency)
|
123
123
|
end
|
124
124
|
|
125
125
|
def transaction_id
|
@@ -202,7 +202,7 @@ module OffsitePayments
|
|
202
202
|
end
|
203
203
|
|
204
204
|
def status( order_id, order_amount )
|
205
|
-
if @notification.invoice_ok?( order_id ) && @notification.amount_ok?(
|
205
|
+
if @notification.invoice_ok?( order_id ) && @notification.amount_ok?(BigDecimal(order_amount))
|
206
206
|
@notification.status
|
207
207
|
else
|
208
208
|
'Mismatch'
|
@@ -125,7 +125,7 @@ module OffsitePayments #:nodoc:
|
|
125
125
|
return false
|
126
126
|
end
|
127
127
|
|
128
|
-
%w(txnid orderid
|
128
|
+
%w(txnid orderid date time hash fraud payercountry issuercountry txnfee subscriptionid paymenttype cardno).each do |attr|
|
129
129
|
define_method(attr) do
|
130
130
|
params[attr]
|
131
131
|
end
|
@@ -138,7 +138,7 @@ module OffsitePayments #:nodoc:
|
|
138
138
|
def generate_md5string
|
139
139
|
md5string = String.new
|
140
140
|
for line in @raw.split('&')
|
141
|
-
key,
|
141
|
+
key, _ = *line.scan( %r{^([A-Za-z0-9_.]+)\=(.*)$} ).flatten
|
142
142
|
md5string += params[key] if key != 'hash'
|
143
143
|
end
|
144
144
|
return md5string + @options[:credential3]
|
@@ -189,7 +189,7 @@ module OffsitePayments #:nodoc:
|
|
189
189
|
response = ssl_get(Gestpay.service_url, decryption_query_string(shop_login, encrypted_string))
|
190
190
|
encoded_response = parse_response(response)
|
191
191
|
parse_delimited_string(encoded_response, DELIMITER, true)
|
192
|
-
rescue GestpayEncryptionResponseError
|
192
|
+
rescue GestpayEncryptionResponseError
|
193
193
|
{ 'PAY1_TRANSACTIONRESULT' => 'Error' }
|
194
194
|
end
|
195
195
|
|
@@ -80,7 +80,7 @@ module OffsitePayments #:nodoc:
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def amount
|
83
|
-
Money.from_amount(BigDecimal
|
83
|
+
Money.from_amount(BigDecimal(gross), currency)
|
84
84
|
end
|
85
85
|
|
86
86
|
def item_id
|
@@ -156,7 +156,7 @@ module OffsitePayments #:nodoc:
|
|
156
156
|
end
|
157
157
|
|
158
158
|
def amount
|
159
|
-
BigDecimal
|
159
|
+
BigDecimal(gross)
|
160
160
|
end
|
161
161
|
|
162
162
|
def item_id
|
@@ -111,7 +111,7 @@ module OffsitePayments #:nodoc:
|
|
111
111
|
check_for_errors(response, xml)
|
112
112
|
|
113
113
|
extract_token(xml)
|
114
|
-
rescue Timeout::Error, Errno::ECONNRESET, Errno::ETIMEDOUT
|
114
|
+
rescue Timeout::Error, Errno::ECONNRESET, Errno::ETIMEDOUT
|
115
115
|
raise ActionViewHelperError, "Erro ao conectar-se ao PagSeguro. Por favor, tente novamente."
|
116
116
|
end
|
117
117
|
|
@@ -212,7 +212,7 @@ module OffsitePayments #:nodoc:
|
|
212
212
|
|
213
213
|
# The net amount credited to the receiver's account.
|
214
214
|
def amount
|
215
|
-
Money.from_amount(BigDecimal
|
215
|
+
Money.from_amount(BigDecimal(params['amount_net']), currency)
|
216
216
|
end
|
217
217
|
|
218
218
|
# The name of the item being charged for.
|
@@ -136,7 +136,7 @@ module OffsitePayments #:nodoc:
|
|
136
136
|
|
137
137
|
# Order amount should be equal to gross
|
138
138
|
def amount_ok?(order_amount)
|
139
|
-
BigDecimal
|
139
|
+
BigDecimal(original_gross) == order_amount
|
140
140
|
end
|
141
141
|
|
142
142
|
# Status of transaction return from the Paytm. List of possible values:
|
@@ -245,7 +245,7 @@ module OffsitePayments #:nodoc:
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def status(order_id, order_amount)
|
248
|
-
if @notification.invoice_ok?(order_id) && @notification.amount_ok?(BigDecimal
|
248
|
+
if @notification.invoice_ok?(order_id) && @notification.amount_ok?(BigDecimal(order_amount))
|
249
249
|
@notification.status
|
250
250
|
else
|
251
251
|
'Mismatch'
|
@@ -116,9 +116,9 @@ module OffsitePayments #:nodoc:
|
|
116
116
|
end
|
117
117
|
|
118
118
|
# Order amount should be equal to gross - discount
|
119
|
-
def amount_ok?( order_amount, order_discount = BigDecimal
|
119
|
+
def amount_ok?( order_amount, order_discount = BigDecimal( '0.0' ) )
|
120
120
|
parsed_discount = discount.nil? ? 0.to_d : discount.to_d
|
121
|
-
BigDecimal
|
121
|
+
BigDecimal( original_gross ) == order_amount && parsed_discount == order_discount
|
122
122
|
end
|
123
123
|
|
124
124
|
# Status of transaction return from the PayU. List of possible values:
|
@@ -258,7 +258,7 @@ module OffsitePayments #:nodoc:
|
|
258
258
|
end
|
259
259
|
|
260
260
|
def status( order_id, order_amount )
|
261
|
-
if @notification.invoice_ok?( order_id ) && @notification.amount_ok?( BigDecimal
|
261
|
+
if @notification.invoice_ok?( order_id ) && @notification.amount_ok?( BigDecimal(order_amount) )
|
262
262
|
@notification.status
|
263
263
|
else
|
264
264
|
'Mismatch'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: offsite_payments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -276,7 +276,8 @@ files:
|
|
276
276
|
homepage: https://github.com/activemerchant/offsite_payments
|
277
277
|
licenses:
|
278
278
|
- MIT
|
279
|
-
metadata:
|
279
|
+
metadata:
|
280
|
+
allowed_push_host: https://rubygems.org
|
280
281
|
post_install_message: "\n In order to use `offsite_payments` gem, you need to either
|
281
282
|
install or add to your Gemfile\n one of the two options for Money gem:\n -
|
282
283
|
`gem 'money'`\n - `gem 'shopify-money', require: 'money'`\n\n Regardless
|