payhyper 0.3.4 → 0.3.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
  SHA1:
3
- metadata.gz: 92a6c2aab4d00a65ecac555ca5af1610505feb57
4
- data.tar.gz: '095457d5648a8fe4eef8dbdfcf4edc73aca257c9'
3
+ metadata.gz: 3b9c6e5b7c7b5b9393bba89ce3f636f0109f34e5
4
+ data.tar.gz: 49fd81185c5ecdd060e197452ef4f019a8d05fb3
5
5
  SHA512:
6
- metadata.gz: dcb14c2b263cb39992d32595d6cfd117a394262fd202428832ca1c52c360878115db95bf77ee3f7588dd85042c6ac143b9e6473547452aa02d97d4144dea57ef
7
- data.tar.gz: d687a5f849d2fb6e375652d4cdba44dece6fb8dfcc0f9a39f86218baae9d7f74c3d5f0aa04c90193c4f00ce122cae4744b9578b70be7170ecce0d2a27827ed56
6
+ metadata.gz: 55bf2aafb1c2876d44600b3570bf4b752991d81879df4fbc25f5a3a7c75594348d0179a0e7a65a5e0ab8be06fbcebb690be5b36ab6c88f26f55e2dbdf3106023
7
+ data.tar.gz: 6d0366c7fc282a8561edeafe1aa3087ca5d978a447ac3cbf4686a6f2748dd5183d6048e08d2d899436af0c6df563d2cf57e1046d8a30e716bffef33f5d37750a
@@ -1,3 +1,3 @@
1
1
  module PayHyper
2
- VERSION = '0.3.4'
2
+ VERSION = '0.3.6'
3
3
  end
data/lib/payhyper.rb CHANGED
@@ -53,7 +53,7 @@ module PayHyper
53
53
  raise ValidationError, "Country specified is incorrect or not supported." unless COUNTRIES.include?(country)
54
54
  raise ValidationError, "Incorrect amount, must be positive." if amount.to_i <= 0
55
55
  raise ValidationError, "Currency is incorrect or not supported." unless CURRENCIES.include?(currency)
56
- raise ValidationError, "Incorrect phone, or not in a supported country." if phone.nil? || !phone.match(/\A#{COUNTRY_CODES[country]}[0-9]{8,9}\z/)
56
+ raise ValidationError, "Incorrect phone, or not in a supported country." if phone.nil? || !phone.match(/\A#{COUNTRY_CODES[country]}[0-9]{8,#{15-COUNTRY_CODES[country].length}}\z/)
57
57
  raise ValidationError, "Invalid email." if email.nil? || !email.match(/\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/)
58
58
  raise ValidationError, "Name is mandatory." if name.nil? || name.strip.length == 0
59
59
  # == Do the request ==
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payhyper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sinan Taifour