nexio_activemerchant 0.2.3 → 0.2.4
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: 75aed4f978138206f5c7fc033bb0e0a81faf69dac593a26a68661a265de059b5
|
4
|
+
data.tar.gz: 97fc92fe19530378d0d86d9dc625310ac1de2db40dca87264a806c97facc0116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f2ab0d0573a9311d7f3753839f39fe9581aab93cf9e30711472edce47f8569365262dec46a09375607ea99f0d9fdbae287a42635bcf748885e836a8353830d3
|
7
|
+
data.tar.gz: 870d45d255eeb17b8ab5d84f80f06e8f05950fb32671ced3a14aa35d816131d85209b531c45a1d3e7523a9f649433d589de81344a74bd289510b0576e392623b
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module ActiveMerchant
|
4
4
|
module Billing
|
5
5
|
class EncryptedNexioCard < CreditCard
|
6
|
+
ALLOWED_CARD_BRANDS = %w(amex discover jcb mastercard visa).freeze
|
7
|
+
|
6
8
|
attr_accessor :encrypted_number, :own_form, :one_time_token
|
7
9
|
|
8
10
|
attr_reader :brand
|
@@ -18,7 +20,7 @@ module ActiveMerchant
|
|
18
20
|
|
19
21
|
if empty?(brand)
|
20
22
|
errors << [:brand, 'is required'] if own_form
|
21
|
-
elsif !
|
23
|
+
elsif !ALLOWED_CARD_BRANDS.include?(brand)
|
22
24
|
errors << [:brand, 'is invalid']
|
23
25
|
end
|
24
26
|
|
@@ -26,6 +26,7 @@ module ActiveMerchant
|
|
26
26
|
|
27
27
|
def generate_token(options = {})
|
28
28
|
post = build_payload(options)
|
29
|
+
post[:data][:allowedCardTypes] = %w(amex discover jcb mastercard visa)
|
29
30
|
add_currency(post, options)
|
30
31
|
add_order_data(post, options)
|
31
32
|
add_card_data(post, options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexio_activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Whitespectre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|