payhyper 0.2.1 → 0.2.2
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 +8 -8
- data/lib/payhyper/version.rb +1 -1
- data/lib/payhyper.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTlkYTY1ZTc5ODZlMmU4NmQwN2ExZTNkMGUyODg2ODBjYWI3NWFhYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2MwZTVmMGM0NDc1ODBkYjFlYjYwM2VkNjYyNDY2OThjZGMwZDEwYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTRlNjA2YTRkMTYzZDVjMGUxZDE3OWJjODQ1MDIyMDM5ODAwMjJiNDdjN2Vi
|
10
|
+
MGI0ZTczMzhjNjc2OWI2NGE0ZWFkNmY3YzA0YzVjZWE1Zjc5OGRlMjg5YjI3
|
11
|
+
ZGNjZGM3ZTcyYTBhYzgzZTRhZTU2MjQ3ZjEzMDBlNGQ2NDI2NTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWI5NDc4MjMwZDA1MzU0YjUwODEyZDJiYTY5YzE4MmFkZTU1ZmRjYTBlZjYz
|
14
|
+
YWU2ODgxNmY1ZGY5OTVlMjgxMTgxOWViYzVlZTNlMGY4YjIzYTg3MmZmZDQy
|
15
|
+
NmIyZjZmYWUwOGUyZDVkNWM2YWE5NjJjZjZkODU1OGE4ODVjM2I=
|
data/lib/payhyper/version.rb
CHANGED
data/lib/payhyper.rb
CHANGED
@@ -57,7 +57,7 @@ module PayHyper
|
|
57
57
|
raise ValidationError, "Country specified is incorrect or not supported." unless COUNTRIES.include?(country)
|
58
58
|
raise ValidationError, "Incorrect amount, must be positive." if amount.to_i <= 0
|
59
59
|
raise ValidationError, "Currency is incorrect or not supported." unless CURRENCIES.include?(currency)
|
60
|
-
raise ValidationError, "Incorrect phone, or not in a supported country." if phone.nil? || !phone.match(/\
|
60
|
+
raise ValidationError, "Incorrect phone, or not in a supported country." if phone.nil? || !phone.match(/\A962[0-9]{8,9}\z/)
|
61
61
|
raise ValidationError, "Invalid email." if email.nil? || !email.match(/\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/)
|
62
62
|
# == Do the request ==
|
63
63
|
body = JSON.dump({ :service => service, :country => country, :amount => amount, :currency => currency, :phone => phone, :email => email, :tag => tag })
|