swiss-activemerchant 1.0.5 → 1.0.6
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f495363874a0b5f387167751e3f3bd1345f848f7f538b9ceb3baeccf79253371
|
4
|
+
data.tar.gz: fc8e643ef10042f872e82fe4c81244b14a46718b402a4ee8395dc50ae981cac2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42272dc8b47779ef0708f35c27ae00539be287cfb72e7d987ed76db684a1767200a7e516fda0c813d488a8e467c88ffe65c5a7b7b8e8c35cf807915c0b4feb82
|
7
|
+
data.tar.gz: 2e7138c1098b2112be1b9876aa834ee6a20a019a2bd489780b33b4a9b0a12be8a1e456ee5447035a67945f131e4423740370ef6870a7f65a3bc5a6265fb5dee2
|
@@ -3,7 +3,7 @@ require 'nokogiri'
|
|
3
3
|
module ActiveMerchant #:nodoc:
|
4
4
|
module Billing #:nodoc:
|
5
5
|
class IxopayGateway < Gateway
|
6
|
-
self.test_url = 'https://secure.
|
6
|
+
self.test_url = 'https://secure.ixopay.com/transaction'
|
7
7
|
self.live_url = 'https://secure.ixopay.com/transaction'
|
8
8
|
|
9
9
|
self.supported_countries = %w(AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW)
|
@@ -102,7 +102,7 @@ module ActiveMerchant #:nodoc:
|
|
102
102
|
|
103
103
|
def generate_signature(http_method, xml, timestamp)
|
104
104
|
content_type = 'text/xml; charset=utf-8'
|
105
|
-
message = "#{http_method}\n#{Digest::
|
105
|
+
message = "#{http_method}\n#{Digest::MD5.hexdigest(xml)}\n#{content_type}\n#{timestamp}\n\n/transaction"
|
106
106
|
digest = OpenSSL::Digest.new('sha512')
|
107
107
|
hmac = OpenSSL::HMAC.digest(digest, @secret, message)
|
108
108
|
|
@@ -118,7 +118,7 @@ module ActiveMerchant #:nodoc:
|
|
118
118
|
|
119
119
|
def build_xml_request
|
120
120
|
builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
|
121
|
-
xml.transactionWithCard 'xmlns' => '
|
121
|
+
xml.transactionWithCard 'xmlns' => 'http://secure.ixopay.com/Schema/V2/TransactionWithCard' do
|
122
122
|
xml.username @options[:username]
|
123
123
|
xml.password Digest::SHA1.hexdigest(@options[:password])
|
124
124
|
yield(xml)
|
@@ -151,7 +151,7 @@ module ActiveMerchant #:nodoc:
|
|
151
151
|
xml.amount localized_amount(money, currency)
|
152
152
|
xml.currency currency
|
153
153
|
xml.description description
|
154
|
-
xml.callbackUrl(
|
154
|
+
xml.callbackUrl(options[:callback_url])
|
155
155
|
add_stored_credentials(xml, options)
|
156
156
|
end
|
157
157
|
end
|
@@ -281,14 +281,12 @@ module ActiveMerchant #:nodoc:
|
|
281
281
|
|
282
282
|
def commit(request)
|
283
283
|
url = (test? ? test_url : live_url)
|
284
|
-
|
284
|
+
|
285
285
|
# ssl_post raises an exception for any non-2xx HTTP status from the gateway
|
286
|
-
debugger
|
287
286
|
response =
|
288
287
|
begin
|
289
288
|
parse(ssl_post(url, request, headers(request)))
|
290
289
|
rescue StandardError => error
|
291
|
-
debugger
|
292
290
|
parse(error.response.body)
|
293
291
|
end
|
294
292
|
|
@@ -246,7 +246,6 @@ module ActiveMerchant #:nodoc:
|
|
246
246
|
post[:shipping_phone] = shipping_address[:phone]
|
247
247
|
end
|
248
248
|
|
249
|
-
debugger
|
250
249
|
if (descriptor = options[:descriptors])
|
251
250
|
post[:descriptor] = options[:descriptor]
|
252
251
|
post[:descriptor_phone] = descriptor[:descriptor_phone]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swiss-activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|