activemerchant 1.81.0 → 1.82.0
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/CHANGELOG +9 -0
- data/lib/active_merchant/billing/gateways/blue_snap.rb +7 -1
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +4 -2
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +5 -0
- data/lib/active_merchant/billing/gateways/payflow_express.rb +1 -4
- data/lib/active_merchant/billing/gateways/paymentez.rb +5 -2
- data/lib/active_merchant/billing/gateways/worldpay.rb +11 -1
- data/lib/active_merchant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bde5a09cd6310799e9c99a524dee8794f7cd8b4
|
4
|
+
data.tar.gz: 7e6b12456471b40677f716aadfd73a58059e9dc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '059ecb8a37d8b7fc83efdf0a575a59c5c2d5ddc14da4d7d9610500f7c52400177dfe76cf88abfa4021bdd4f2fc8aa9564dc4b04ecb7072e9543da59589f6997e'
|
7
|
+
data.tar.gz: e339a4da14fdc7a0c7d746946452aea9d512c0ce6b8bc5b294d5aff0b8c1cbabb40f495ec240a8d9a878ff65409b01e3bde20d3657efa189d32ff2b7563d3c18
|
data/CHANGELOG
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
= ActiveMerchant CHANGELOG
|
2
2
|
|
3
3
|
== HEAD
|
4
|
+
== Version 1.82.0 (August 13, 2018)
|
5
|
+
* FirstData: add support for WalletProviderID in v27 gateway [bpollack] #2946
|
6
|
+
* BlueSnap: Handle 403 responses [curiousepic] #2948
|
7
|
+
* BlueSnap: Add StoreCard Field [nfarve] #2953
|
8
|
+
* Worldpay: support installments [bpollack] #2957
|
9
|
+
* Paymentez: support partial refunds [bpollack] #2959
|
10
|
+
* Payflow: allow support for partial captures [pi3r] #2952
|
11
|
+
|
12
|
+
== Version 1.81.0 (July 30, 2018)
|
4
13
|
* GlobalCollect: Don't overwrite contactDetails [curiousepic] #2915
|
5
14
|
* Pin Payments: Pass reference for statement desc [curiousepic] #2919
|
6
15
|
* FirstData: introduce v27 gateway [shasum] #2912
|
@@ -116,7 +116,7 @@ module ActiveMerchant
|
|
116
116
|
|
117
117
|
def verify_credentials
|
118
118
|
begin
|
119
|
-
ssl_get(
|
119
|
+
ssl_get(url.to_s, headers)
|
120
120
|
rescue ResponseError => e
|
121
121
|
return false if e.response.code.to_i == 401
|
122
122
|
end
|
@@ -140,6 +140,7 @@ module ActiveMerchant
|
|
140
140
|
def add_auth_purchase(doc, money, payment_method, options)
|
141
141
|
doc.send('recurring-transaction', options[:recurring] ? 'RECURRING' : 'ECOMMERCE')
|
142
142
|
add_order(doc, options)
|
143
|
+
doc.send('storeCard', options[:store_card] || false)
|
143
144
|
add_amount(doc, money, options)
|
144
145
|
doc.send('transaction-fraud-info') do
|
145
146
|
doc.send('shopper-ip-address', options[:ip]) if options[:ip]
|
@@ -209,6 +210,7 @@ module ActiveMerchant
|
|
209
210
|
|
210
211
|
def parse(response)
|
211
212
|
return bad_authentication_response if response.code.to_i == 401
|
213
|
+
return forbidden_response(response.body) if response.code.to_i == 403
|
212
214
|
|
213
215
|
parsed = {}
|
214
216
|
doc = Nokogiri::XML(response.body)
|
@@ -338,6 +340,10 @@ module ActiveMerchant
|
|
338
340
|
def bad_authentication_response
|
339
341
|
{ 'description' => 'Unable to authenticate. Please check your credentials.' }
|
340
342
|
end
|
343
|
+
|
344
|
+
def forbidden_response(body)
|
345
|
+
{ 'description' => body }
|
346
|
+
end
|
341
347
|
end
|
342
348
|
end
|
343
349
|
end
|
@@ -211,6 +211,7 @@ module ActiveMerchant #:nodoc:
|
|
211
211
|
xml.tag! 'Expiry_Date', expdate(credit_card)
|
212
212
|
xml.tag! 'CardHoldersName', credit_card.name
|
213
213
|
xml.tag! 'CardType', card_type(credit_card.brand)
|
214
|
+
xml.tag! 'WalletProviderID', options[:wallet_provider_id] if options[:wallet_provider_id]
|
214
215
|
|
215
216
|
add_credit_card_eci(xml, credit_card, options)
|
216
217
|
add_credit_card_verification_strings(xml, credit_card, options)
|
@@ -273,6 +274,7 @@ module ActiveMerchant #:nodoc:
|
|
273
274
|
xml.tag! 'Expiry_Date', expdate(credit_card)
|
274
275
|
xml.tag! 'CardHoldersName', credit_card.name
|
275
276
|
xml.tag! 'CardType', card_type(credit_card.brand)
|
277
|
+
xml.tag! 'WalletProviderID', options[:wallet_provider_id] if options[:wallet_provider_id]
|
276
278
|
add_card_authentication_data(xml, options)
|
277
279
|
end
|
278
280
|
|
@@ -398,9 +400,9 @@ module ActiveMerchant #:nodoc:
|
|
398
400
|
end
|
399
401
|
|
400
402
|
def message_from(response)
|
401
|
-
if
|
403
|
+
if response[:faultcode] && response[:faultstring]
|
402
404
|
response[:faultstring]
|
403
|
-
elsif
|
405
|
+
elsif response[:error_number] && response[:error_number] != '0'
|
404
406
|
response[:error_description]
|
405
407
|
else
|
406
408
|
result = (response[:exact_message] || '')
|
@@ -119,6 +119,11 @@ module ActiveMerchant #:nodoc:
|
|
119
119
|
xml.tag!('Description', options[:description]) unless options[:description].blank?
|
120
120
|
xml.tag!('Comment', options[:comment]) unless options[:comment].blank?
|
121
121
|
xml.tag!('ExtData', 'Name'=> 'COMMENT2', 'Value'=> options[:comment2]) unless options[:comment2].blank?
|
122
|
+
xml.tag!(
|
123
|
+
'ExtData',
|
124
|
+
'Name' => 'CAPTURECOMPLETE',
|
125
|
+
'Value' => options[:capture_complete]
|
126
|
+
) unless options[:capture_complete].blank?
|
122
127
|
end
|
123
128
|
end
|
124
129
|
end
|
@@ -9,9 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
# in the docs that they recommend you pass the exact same parameters to both setup and authorize/purchase.
|
10
10
|
#
|
11
11
|
# This information was gleaned from a mix of:
|
12
|
-
# * PayFlow documentation
|
13
|
-
# * for key value pairs: {Express Checkout for Payflow Pro (PDF)}[https://cms.paypal.com/cms_content/US/en_US/files/developer/PFP_ExpressCheckout_PP.pdf]
|
14
|
-
# * XMLPay: {Payflow Pro XMLPay Developer's Guide (PDF)}[https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PayflowPro_XMLPay_Guide.pdf]
|
12
|
+
# * {PayFlow documentation}[https://developer.paypal.com/docs/classic/payflow/integration-guide/]
|
15
13
|
# * previous ActiveMerchant code
|
16
14
|
# * trial & error
|
17
15
|
#
|
@@ -221,4 +219,3 @@ module ActiveMerchant #:nodoc:
|
|
221
219
|
end
|
222
220
|
end
|
223
221
|
end
|
224
|
-
|
@@ -76,8 +76,11 @@ module ActiveMerchant #:nodoc:
|
|
76
76
|
commit_transaction('capture', post)
|
77
77
|
end
|
78
78
|
|
79
|
-
def refund(
|
80
|
-
|
79
|
+
def refund(money, authorization, options = {})
|
80
|
+
post = {transaction: {id: authorization}}
|
81
|
+
post[:order] = {amount: amount(money).to_f} if money
|
82
|
+
|
83
|
+
commit_transaction('refund', post)
|
81
84
|
end
|
82
85
|
|
83
86
|
def void(authorization, _options = {})
|
@@ -168,6 +168,9 @@ module ActiveMerchant #:nodoc:
|
|
168
168
|
if options[:hcg_additional_data]
|
169
169
|
add_hcg_additional_data(xml, options)
|
170
170
|
end
|
171
|
+
if options[:instalments]
|
172
|
+
add_instalments_data(xml, options)
|
173
|
+
end
|
171
174
|
end
|
172
175
|
end
|
173
176
|
end
|
@@ -292,6 +295,13 @@ module ActiveMerchant #:nodoc:
|
|
292
295
|
end
|
293
296
|
end
|
294
297
|
|
298
|
+
def add_instalments_data(xml, options)
|
299
|
+
xml.tag! 'thirdPartyData' do
|
300
|
+
xml.tag! 'instalments', options[:instalments]
|
301
|
+
xml.tag! 'cpf', options[:cpf] if options[:cpf]
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
295
305
|
def address_with_defaults(address)
|
296
306
|
address ||= {}
|
297
307
|
address.delete_if { |_, v| v.blank? }
|
@@ -370,7 +380,7 @@ module ActiveMerchant #:nodoc:
|
|
370
380
|
def handle_response(response)
|
371
381
|
case response.code.to_i
|
372
382
|
when 200...300
|
373
|
-
@cookie = response
|
383
|
+
@cookie = response['Set-Cookie']
|
374
384
|
response.body
|
375
385
|
else
|
376
386
|
raise ResponseError.new(response)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.82.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|