judopay 2.1.0 → 2.1.3
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 +5 -5
- data/.gitignore +24 -23
- data/.rspec +1 -1
- data/.rubocop.yml +54 -51
- data/.travis.yml +6 -6
- data/CHANGELOG.md +17 -17
- data/Gemfile +4 -4
- data/LICENSE +21 -21
- data/README.md +96 -94
- data/Rakefile +22 -22
- data/judopay.gemspec +38 -38
- data/lib/certs/digicert_sha256_ca.pem +49 -49
- data/lib/certs/rapidssl_ca.crt +63 -63
- data/lib/faraday/judo_mashify.rb +11 -11
- data/lib/faraday/raise_http_exception.rb +19 -19
- data/lib/judopay.rb +70 -70
- data/lib/judopay/api.rb +10 -10
- data/lib/judopay/connection.rb +77 -77
- data/lib/judopay/core_ext/hash.rb +29 -29
- data/lib/judopay/core_ext/string.rb +32 -32
- data/lib/judopay/error.rb +117 -115
- data/lib/judopay/mash.rb +11 -11
- data/lib/judopay/model.rb +134 -134
- data/lib/judopay/models/android_payment.rb +26 -26
- data/lib/judopay/models/android_preauth.rb +8 -8
- data/lib/judopay/models/apple_payment.rb +26 -26
- data/lib/judopay/models/apple_preauth.rb +9 -9
- data/lib/judopay/models/card_address.rb +11 -11
- data/lib/judopay/models/card_payment.rb +33 -33
- data/lib/judopay/models/card_preauth.rb +11 -11
- data/lib/judopay/models/collection.rb +16 -16
- data/lib/judopay/models/encrypt_details.rb +18 -0
- data/lib/judopay/models/inner/pk_payment.rb +17 -17
- data/lib/judopay/models/inner/pk_payment_token.rb +13 -13
- data/lib/judopay/models/inner/transmitted_field.rb +39 -39
- data/lib/judopay/models/inner/wallet.rb +30 -30
- data/lib/judopay/models/market/collection.rb +10 -10
- data/lib/judopay/models/market/payment.rb +10 -10
- data/lib/judopay/models/market/preauth.rb +10 -10
- data/lib/judopay/models/market/refund.rb +10 -10
- data/lib/judopay/models/market/transaction.rb +10 -10
- data/lib/judopay/models/one_use_token_payment.rb +29 -0
- data/lib/judopay/models/payment.rb +8 -8
- data/lib/judopay/models/preauth.rb +8 -8
- data/lib/judopay/models/refund.rb +16 -16
- data/lib/judopay/models/register_card.rb +27 -27
- data/lib/judopay/models/save_card.rb +24 -25
- data/lib/judopay/models/token_payment.rb +30 -30
- data/lib/judopay/models/token_preauth.rb +10 -10
- data/lib/judopay/models/transaction.rb +8 -8
- data/lib/judopay/models/void.rb +19 -19
- data/lib/judopay/models/web_payments/payment.rb +28 -28
- data/lib/judopay/models/web_payments/preauth.rb +10 -10
- data/lib/judopay/models/web_payments/transaction.rb +19 -19
- data/lib/judopay/models/web_payments/web_payment_operation.rb +8 -8
- data/lib/judopay/null_logger.rb +9 -11
- data/lib/judopay/request.rb +50 -50
- data/lib/judopay/response.rb +7 -7
- data/lib/judopay/serializer.rb +27 -27
- data/lib/judopay/version.rb +4 -4
- data/spec/factories.rb +227 -208
- data/spec/faraday/response_spec.rb +27 -27
- data/spec/fixtures/card_payments/create.json +21 -21
- data/spec/fixtures/card_payments/create_3dsecure.json +7 -7
- data/spec/fixtures/card_payments/create_bad_request.json +12 -12
- data/spec/fixtures/card_payments/create_declined.json +23 -23
- data/spec/fixtures/card_payments/validate.json +4 -4
- data/spec/fixtures/token_payments/create.json +21 -21
- data/spec/fixtures/transactions/all.json +237 -237
- data/spec/fixtures/transactions/android_payment.json +26 -26
- data/spec/fixtures/transactions/apple_payment.json +26 -26
- data/spec/fixtures/transactions/find.json +22 -22
- data/spec/fixtures/transactions/find_not_found.json +4 -4
- data/spec/fixtures/transactions/register_card.json +28 -28
- data/spec/fixtures/transactions/save_card.json +27 -27
- data/spec/fixtures/transactions/void.json +26 -26
- data/spec/fixtures/web_payments/payments/create.json +3 -3
- data/spec/fixtures/web_payments/payments/find.json +38 -38
- data/spec/judopay/android_payment_spec.rb +74 -74
- data/spec/judopay/apple_payment_spec.rb +80 -80
- data/spec/judopay/card_address_spec.rb +10 -10
- data/spec/judopay/card_payment_spec.rb +51 -63
- data/spec/judopay/card_preauth_spec.rb +35 -35
- data/spec/judopay/collection_spec.rb +26 -26
- data/spec/judopay/core_ext/hash_spec.rb +24 -24
- data/spec/judopay/core_ext/string_spec.rb +16 -16
- data/spec/judopay/error_spec.rb +70 -70
- data/spec/judopay/judopay_spec.rb +19 -19
- data/spec/judopay/market/collection_spec.rb +26 -26
- data/spec/judopay/market/payment_spec.rb +14 -14
- data/spec/judopay/market/preauth_spec.rb +14 -14
- data/spec/judopay/market/refund_spec.rb +26 -26
- data/spec/judopay/market/transaction_spec.rb +14 -14
- data/spec/judopay/payment_spec.rb +14 -14
- data/spec/judopay/preauth_spec.rb +14 -14
- data/spec/judopay/refund_spec.rb +26 -26
- data/spec/judopay/register_card_spec.rb +24 -24
- data/spec/judopay/save_card_spec.rb +23 -23
- data/spec/judopay/token_payment_spec.rb +22 -22
- data/spec/judopay/token_preauth_spec.rb +22 -22
- data/spec/judopay/transaction_spec.rb +51 -51
- data/spec/judopay/void_spec.rb +24 -24
- data/spec/judopay/web_payments/payment_spec.rb +16 -16
- data/spec/judopay/web_payments/preauth_spec.rb +16 -16
- data/spec/judopay/web_payments/transaction_spec.rb +15 -15
- data/spec/spec_helper.rb +41 -41
- data/test/additions_payment_test.rb +30 -0
- data/test/authentication_test.rb +23 -23
- data/test/base/integration_base.rb +20 -20
- data/test/base/payments_tests.rb +47 -47
- data/test/base/token_payment_tests.rb +98 -98
- data/test/card_details_test.rb +21 -21
- data/test/configuration_test.rb +35 -35
- data/test/helper/assertion_helper.rb +29 -29
- data/test/payment_test.rb +10 -10
- data/test/preauth_test.rb +10 -10
- data/test/register_card_test.rb +42 -42
- data/test/save_card_test.rb +23 -0
- data/test/token_payment_test.rb +10 -10
- data/test/token_preauth_test.rb +10 -10
- data/test/void_test.rb +45 -45
- metadata +18 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c4322bcef8c0b210b38579fe124137e8b92e9ff150f2b76449e9d91b4b5c4174
|
4
|
+
data.tar.gz: 29e03ee4dba7843a6417842348f77dc02eae10f1fbe25ddbc70800a5cbb1a2b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2d9f55bd0cb4b04ad493ebd46a18ab5749e42c15302a44967679a93dc33399505fa1855bc17d81bdcc6b4136f310dd6959a7a9a408df5d4c7a1bbabafbbffa6
|
7
|
+
data.tar.gz: 377e8961642271df5917446752e9d09f85a27228d81c2e117fd1a8d87ae2a973493f595effa402e79a9c4fac84d82595635d8d0c004b9f23e88b2933dbbe2aae
|
data/.gitignore
CHANGED
@@ -1,23 +1,24 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
.yardoc
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
test/
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
.idea
|
7
|
+
Gemfile.lock
|
8
|
+
InstalledFiles
|
9
|
+
_yardoc
|
10
|
+
coverage
|
11
|
+
doc/
|
12
|
+
lib/bundler/man
|
13
|
+
pkg
|
14
|
+
rdoc
|
15
|
+
spec/reports
|
16
|
+
test/tmp
|
17
|
+
test/version_tmp
|
18
|
+
tmp
|
19
|
+
|
20
|
+
log.txt
|
21
|
+
|
22
|
+
cmd.txt
|
23
|
+
|
24
|
+
output.txt
|
data/.rspec
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
--color
|
1
|
+
--color
|
2
2
|
--require spec_helper
|
data/.rubocop.yml
CHANGED
@@ -1,51 +1,54 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2014-06-26 17:06:45 +0100 using RuboCop version 0.23.0.
|
3
|
-
# The point is for the user to remove these configuration records
|
4
|
-
# one by one as the offenses are removed from the code base.
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
7
|
-
|
8
|
-
# Offense count: 2
|
9
|
-
# Cop supports --auto-correct.
|
10
|
-
Lint/UnusedMethodArgument:
|
11
|
-
Enabled: false
|
12
|
-
|
13
|
-
# Offense count: 1
|
14
|
-
|
15
|
-
Max: 10
|
16
|
-
|
17
|
-
# Offense count: 15
|
18
|
-
Style/Documentation:
|
19
|
-
Enabled: false
|
20
|
-
|
21
|
-
# Offense count: 18
|
22
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
23
|
-
|
24
|
-
Enabled: false
|
25
|
-
|
26
|
-
# Offense count: 73
|
27
|
-
# Cop supports --auto-correct.
|
28
|
-
# Configuration parameters: SupportedStyles.
|
29
|
-
Style/HashSyntax:
|
30
|
-
EnforcedStyle: hash_rockets
|
31
|
-
|
32
|
-
# Offense count: 18
|
33
|
-
Style/Lambda:
|
34
|
-
Enabled: false
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
1
|
+
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
+
# on 2014-06-26 17:06:45 +0100 using RuboCop version 0.23.0.
|
3
|
+
# The point is for the user to remove these configuration records
|
4
|
+
# one by one as the offenses are removed from the code base.
|
5
|
+
# Note that changes in the inspected code, or installation of new
|
6
|
+
# versions of RuboCop, may require this file to be generated again.
|
7
|
+
|
8
|
+
# Offense count: 2
|
9
|
+
# Cop supports --auto-correct.
|
10
|
+
Lint/UnusedMethodArgument:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
# Offense count: 1
|
14
|
+
Metrics/CyclomaticComplexity:
|
15
|
+
Max: 10
|
16
|
+
|
17
|
+
# Offense count: 15
|
18
|
+
Style/Documentation:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
# Offense count: 18
|
22
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
23
|
+
Layout/DotPosition:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
# Offense count: 73
|
27
|
+
# Cop supports --auto-correct.
|
28
|
+
# Configuration parameters: SupportedStyles.
|
29
|
+
Style/HashSyntax:
|
30
|
+
EnforcedStyle: hash_rockets
|
31
|
+
|
32
|
+
# Offense count: 18
|
33
|
+
Style/Lambda:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Style/SymbolArray:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
# Offense count: 25
|
40
|
+
Metrics/LineLength:
|
41
|
+
Max: 141
|
42
|
+
|
43
|
+
# Offense count: 3
|
44
|
+
# Configuration parameters: CountComments.
|
45
|
+
Metrics/MethodLength:
|
46
|
+
Max: 80
|
47
|
+
|
48
|
+
Metrics/BlockLength:
|
49
|
+
Max: 65
|
50
|
+
|
51
|
+
AllCops:
|
52
|
+
Exclude:
|
53
|
+
- 'judopay.gemspec'
|
54
|
+
- 'spec/factories.rb'
|
data/.travis.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 2.3.0
|
4
|
-
- 2.1.2
|
5
|
-
- 2.0.0
|
6
|
-
sudo: false
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.3.0
|
4
|
+
- 2.1.2
|
5
|
+
- 2.0.0
|
6
|
+
sudo: false
|
data/CHANGELOG.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
# Version 2.0.0
|
2
|
-
|
3
|
-
#### Modifications
|
4
|
-
In version 2.0 we changed error model and added couple of new models.
|
5
|
-
|
6
|
-
We decreased amount of Exceptions to two:
|
7
|
-
- Local validation error (ValidationError)
|
8
|
-
- ApiException which arise when Judo REST API returns error.
|
9
|
-
|
10
|
-
So at first you need to update your error handling principle. See example at [Error handling](https://github.com/JudoPay/RubySdk/wiki/Error-handling).
|
11
|
-
|
12
|
-
#### Additions
|
13
|
-
- ```validate``` method added to [Collect](https://github.com/JudoPay/RubySdk/wiki/Collecting-on-a-Pre-Authorization#validating-the-collection) and [Refund](https://github.com/JudoPay/PhpSdk/wiki/Refund-a-Payment#validating-the-refund) models so now you could check yours transactions.
|
14
|
-
- [Void model](https://github.com/JudoPay/RubySdk/wiki/Voiding-requests)
|
15
|
-
- [Register card model](https://github.com/JudoPay/RubySdk/wiki/Registering-a-Card)
|
16
|
-
- [Save card model](https://github.com/JudoPay/RubySdk/wiki/Saving-a-Card)
|
17
|
-
- Integration tests
|
1
|
+
# Version 2.0.0
|
2
|
+
|
3
|
+
#### Modifications
|
4
|
+
In version 2.0 we changed error model and added couple of new models.
|
5
|
+
|
6
|
+
We decreased amount of Exceptions to two:
|
7
|
+
- Local validation error (ValidationError)
|
8
|
+
- ApiException which arise when Judo REST API returns error.
|
9
|
+
|
10
|
+
So at first you need to update your error handling principle. See example at [Error handling](https://github.com/JudoPay/RubySdk/wiki/Error-handling).
|
11
|
+
|
12
|
+
#### Additions
|
13
|
+
- ```validate``` method added to [Collect](https://github.com/JudoPay/RubySdk/wiki/Collecting-on-a-Pre-Authorization#validating-the-collection) and [Refund](https://github.com/JudoPay/PhpSdk/wiki/Refund-a-Payment#validating-the-refund) models so now you could check yours transactions.
|
14
|
+
- [Void model](https://github.com/JudoPay/RubySdk/wiki/Voiding-requests)
|
15
|
+
- [Register card model](https://github.com/JudoPay/RubySdk/wiki/Registering-a-Card)
|
16
|
+
- [Save card model](https://github.com/JudoPay/RubySdk/wiki/Saving-a-Card)
|
17
|
+
- Integration tests
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in judopay.gemspec
|
4
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in judopay.gemspec
|
4
|
+
gemspec
|
data/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2016 Alternative Payments Ltd
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2016 Alternative Payments Ltd
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,94 +1,96 @@
|
|
1
|
-
# Judopay Ruby gem [](https://travis-ci.org/Judopay/Judo-Ruby)
|
2
|
+
The JudoPay gem provides you with ability to integrate card payments into your Ruby and Rails projects. Judo's SDK enables a faster, simpler and more secure payment experience within your app.
|
3
|
+
|
4
|
+
|
5
|
+
## Requirements
|
6
|
+
The Judopay gem supports Ruby 1.9.3 and above (including 2.x).
|
7
|
+
|
8
|
+
## Getting started
|
9
|
+
##### 1. Integration
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
gem 'judopay'
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install judopay
|
21
|
+
|
22
|
+
##### 2. Setup
|
23
|
+
To start using the gem, you need to pass block with your API credentials:
|
24
|
+
```ruby
|
25
|
+
require 'judopay'
|
26
|
+
Judopay.configure do |config|
|
27
|
+
config.judo_id = '<JUDO_ID>'
|
28
|
+
config.api_token = '<TOKEN>'
|
29
|
+
config.api_secret = '<SECRET>'
|
30
|
+
config.use_production = false # set to true on production, defaults to false which is the sandbox
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
##### 3. Make a payment
|
35
|
+
Add model inclusion to your source code:
|
36
|
+
```ruby
|
37
|
+
require 'judopay/models/card_payment'
|
38
|
+
```
|
39
|
+
**Note:** by default we only include the minimum models in order to keep memory footprint down. You will need to include it explicitly when using each type of payment model as defined in the wiki.
|
40
|
+
|
41
|
+
To make a new payment with full card details:
|
42
|
+
```ruby
|
43
|
+
payment = Judopay::CardPayment.new(
|
44
|
+
:judoId => '<JUDO_ID>',
|
45
|
+
:your_consumer_reference => '<CONSUMER_REFERENCE>',
|
46
|
+
:your_payment_reference => '<PAYMENT_REFERENCE>',
|
47
|
+
:amount => 5.01,
|
48
|
+
:currency => 'GBP',
|
49
|
+
:card_number => '4976000000003436',
|
50
|
+
:expiry_date => '12/20',
|
51
|
+
:cv2 => '452',
|
52
|
+
:card_address => {
|
53
|
+
:line1 => '32 Edward Street',
|
54
|
+
:town => 'Camborne',
|
55
|
+
:postcode => 'TR14 8PA'
|
56
|
+
}
|
57
|
+
)
|
58
|
+
```
|
59
|
+
**Note:** Please make sure that you are using a unique `your_consumer_reference` for each different consumer, and a unique `your_payment_reference` for each transaction.
|
60
|
+
|
61
|
+
You can check on the required fields and the format of each field in the [Judopay REST API reference](https://www.judopay.com/docs/version-52/api/restful-api/#post-card-payment).
|
62
|
+
|
63
|
+
To send the request to the API, call:
|
64
|
+
```ruby
|
65
|
+
payment_response = payment.create
|
66
|
+
```
|
67
|
+
|
68
|
+
##### 4. Check the payment result
|
69
|
+
The response will contain the full details of the transaction: (see full response [here](https://www.judopay.com/docs/v5/api-reference/restful-api/#post-card-payment)):
|
70
|
+
```ruby
|
71
|
+
{
|
72
|
+
"receipt_id"=>"xxxxxxx",
|
73
|
+
"type"=>"Payment",
|
74
|
+
"created_at"=>"2016-09-23T09:28:47.1207+01:00",
|
75
|
+
"result"=>"Success",
|
76
|
+
"amount"=>"5.01",
|
77
|
+
"currency"=>"GBP",
|
78
|
+
...
|
79
|
+
}
|
80
|
+
```
|
81
|
+
The status of the transaction can be checked to see if it was successful:
|
82
|
+
```ruby
|
83
|
+
if payment_response.result == 'Success'
|
84
|
+
puts 'Payment successful'
|
85
|
+
else
|
86
|
+
puts 'There was an issue while processing the payment'
|
87
|
+
end
|
88
|
+
```
|
89
|
+
|
90
|
+
It's important to handle different exceptions in your code. See more details in our [error handling section](https://github.com/JudoPay/RubySdk/wiki/Error-handling).
|
91
|
+
|
92
|
+
## Next steps
|
93
|
+
The Judopay gem supports a range of customization options. For more information on using the Judo Ruby SDK see our [wiki documentation](https://github.com/JudoPay/RubySdk/wiki).
|
94
|
+
|
95
|
+
## License
|
96
|
+
See the [LICENSE](https://github.com/JudoPay/RubySdk/blob/master/LICENSE.txt) file for license rights and limitations (MIT).
|