nexio_activemerchant 0.2.3 → 0.2.4

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
  SHA256:
3
- metadata.gz: aa463661c8db5f5568825ac31a6bd4c42d5997bd4df1fef6f7afb92f0d72501a
4
- data.tar.gz: 33e492999b3bdd59a53d764ef1d4e0ba46d7ada66e16b89a378b2c891139d73c
3
+ metadata.gz: 75aed4f978138206f5c7fc033bb0e0a81faf69dac593a26a68661a265de059b5
4
+ data.tar.gz: 97fc92fe19530378d0d86d9dc625310ac1de2db40dca87264a806c97facc0116
5
5
  SHA512:
6
- metadata.gz: 9815bde8e3cf49027550eb1bfe25f112ed17e1fb2e557c6ec14ddff479a1ad66ad01c95eef099988d611e106bc770f4c952754bdf570412c1cb496a8366d82b0
7
- data.tar.gz: ce430b0a30c7608a97a3377a80eff3bf5a67b3116e00066b616213abb7aa2e85d3d6c7009c3f65547a06014cea5ebb3abc9123a0f2a763087f82d68c6ab60a16
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 !self.class.card_companies.include?(brand)
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NexioActivemerchant
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
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.3
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-08-11 00:00:00.000000000 Z
11
+ date: 2021-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant