transact_pro 0.9.0 → 0.9.1

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
  SHA1:
3
- metadata.gz: 645ba37a51c3535eeab929d2f895de23781a90fd
4
- data.tar.gz: 538bfa9d7043a9c363621cc09e1d0bf229783411
3
+ metadata.gz: ea2547ebfc5653b2be09521f5bf08f9b549087f9
4
+ data.tar.gz: b574d8c300e908ca5c44cb77068f097ae29c10c9
5
5
  SHA512:
6
- metadata.gz: 942111d185f8a9788f57f5e046561cc09e60930a77d7befd9c71eaa93877632428562197184dd3d5e5817c5ed198727047254a70d3ac2d1e11a465b6e6e2de4d
7
- data.tar.gz: b73c4b1102249947015b3f5f10a86a31bc159a49bd1b67f5740997944809913bb3cfb13c2a8013c78712d5c45f0508acf690a24b9041915887f8ed0ed225d567
6
+ metadata.gz: 6d92cea0402398bee8ee3624e676886767492b0f6abfc03c50ca5f24ff1fab1cf7904b1955b26527b4fb8c9b57caa29f39dbc4e7f59068b40e36196f23724361
7
+ data.tar.gz: ef18c075501d2eba2a8a33e5edf5a56f9673cc7d63a2dc5cc111b35c6a7f6007bf37267f784bd8e9f657b7ea4b46a0e38c22d08330553a1b5535d1e4e54f2bc4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- transact_pro (0.9.0)
4
+ transact_pro (0.9.1)
5
5
  rest-client (~> 2.0.2)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -13,13 +13,13 @@ As of v1.0.0 (2018-01-04) the full functionality status list is:
13
13
  |---|---|---|---|---|
14
14
  | SMS transaction init, card details entered merchant-side | *init | 12 | ✗ | - |
15
15
  | SMS transaction init, card details entered gateway-side | *init | 21 | ✓ | `tid` & `redirect link` |
16
- | SMS transaction init with card data save flag, card details entered gateway-side | *init_recurring_registration | 42 | ✓ | - |
16
+ | SMS transaction init with card data save flag, card details entered gateway-side | *init_recurring_registration | 42 | ✓ | `tid` & `redirect link` |
17
17
  | DMS init, card details entered merchant-side | make_hold | 37 | ✗ | - |
18
18
  | DMS init, card details entered gateway-side | init_dms | 37 | ✗ | - |
19
19
  | DMS execute | charge_hold | 37 | ✗ | - |
20
20
  | Save card details for subsequent recurring payments, details entered gateway-side | init_store_card_sms | 45 | ✗ | - |
21
21
  | Recurrent SMS, init a recurring payment | init_recurrent | 46 | ✓ | `tid` |
22
- | Recurrent SMS, execute a recurring payment | charge_recurrent | 48 | ✓ | Status:Success... |
22
+ | Recurrent SMS, execute a recurring payment | charge_recurrent | 48 | ✓ | "Status:Success..." |
23
23
  | Credit transaction init | init_credit | 17 | ✗ | - |
24
24
  | Credit transaction execute | do_credit | 17 | ✗ | - |
25
25
  | P2P transaction init | init_p2p | 18 | ✗ | - |
@@ -29,7 +29,7 @@ As of v1.0.0 (2018-01-04) the full functionality status list is:
29
29
  | Payment cancellation | cancel_request | 23 | ✗ | - |
30
30
  | DMS cancellation | cancel_dms | 38 | ✗ | - |
31
31
  | Payment execution (charge) | charge | 24 | ✗ | - |
32
- | Payment status request | status_request | 31 | ✓ | Status:Success... |
32
+ | Payment status request | status_request | 31 | ✓ | "Status:Success..." |
33
33
  | Payment refund | ***refund | 34 | ✗ | "Refund Success" |
34
34
  | Card verification | verify_card | 39 | ✗ | - |
35
35
  | Terminal Limits | get_terminal_limits | 41 | ✗ | - |
@@ -78,17 +78,20 @@ gateway = TransactPro::Gateway.new(options)
78
78
 
79
79
  ### 2. `TransactPro::Request`
80
80
 
81
- Use the `Gateway` instance's `#request` method to perform requests.
81
+ Use the `Gateway` instance's `#request` method to build and perform requests.
82
82
 
83
83
  ```rb
84
84
  options = {
85
85
  method: :status_request, # mandatory, exclusively symbol objects for value
86
86
  request_type: 'transaction_status',
87
87
  init_transaction_id: "abc123",
88
- # Note that passing :guid and :pwd is possible and `#call` will always override any defaults with the latest passed values, but generally you should rely on these values being set correctly from GUID and PASSWORD in gateway configuration.
88
+ # Note that passing :guid and :pwd is possible and `#call` will always override
89
+ # any defaults with the latest passed values, but generally you should rely on
90
+ # these values being set correctly from GUID and PASSWORD in gateway configuration.
89
91
  guid: "..."
90
92
  pwd: "..."
91
- # Note that :rs is optional and will be inferred from gateway defaults, preferring 3D accounts to NON3D, where applicable.
93
+ # Note that :rs is optional and will be inferred from gateway defaults,
94
+ # preferring 3D accounts to NON3D, where applicable.
92
95
  rs: "..."
93
96
  }
94
97
 
@@ -100,7 +103,7 @@ request_instance.call #=> response
100
103
 
101
104
  ### 3. `TransactPro::Response`
102
105
  `Response` objects are thin wrappers around the response bodies received from communicating with the TransactPro API.
103
- Use `#to_s` on them to get the raw body and do any handling yourslef.
106
+ Use `#to_s` on them to get the raw body and do any handling yourself.
104
107
  The gem provides a couple methods for ease of use:
105
108
 
106
109
  ```rb
@@ -32,11 +32,9 @@ class TransactPro::Response
32
32
  portion[%r'\A(OK)|(Status)\:']
33
33
  end
34
34
 
35
- if status_portion.nil?
36
- "ERROR"
37
- elsif status_portion[%r'\AOK']
35
+ if status_portion.to_s[%r'\AOK']
38
36
  "OK"
39
- elsif status_portion[%r'\AStatus']
37
+ elsif status_portion.to_s[%r'\AStatus']
40
38
  status = status_portion.match(%r'\AStatus:(.*)')[1]
41
39
  status == "Success" ? "OK" : "FAIL"
42
40
  else
@@ -1,3 +1,3 @@
1
1
  module TransactPro
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transact_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Epigene