bluepay-rb 0.1.0 → 0.2.0
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +68 -1
- data/lib/bluepay/capture.rb +10 -0
- data/lib/bluepay/refund.rb +10 -0
- data/lib/bluepay/transaction_base.rb +3 -0
- data/lib/bluepay/version.rb +1 -1
- data/lib/bluepay/void.rb +10 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbbf96d23d176de144c681239dc585d1d1ece2b0c91f4d0d36428b6390b09ee1
|
4
|
+
data.tar.gz: 30817f6976332c1c8e0021b5d7ce25b8e5ebbe1f78253cff2399c965838d510f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4879c87731ba2924f0ad85b023a699df0ee3e856ad924342045b5f287321fd144322a30c37bf355889875c0852fda01b693f9a9e816efc6209da642577769d39
|
7
|
+
data.tar.gz: e076818c956a5e8f682a9f9b9619af9fb11654ffdbdf08445e5063a8ff3ba4b64c3b215c6c9867b9e1ee1948a7d068f105b44d86b8f35c7c10eba5e040cefd8d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -47,6 +47,52 @@ auth = Bluepay::Auth.new(
|
|
47
47
|
|
48
48
|
auth.trans_id
|
49
49
|
#=> "10080152343"
|
50
|
+
auth.message
|
51
|
+
#=> "INFORMATION STORED"
|
52
|
+
|
53
|
+
auth = Bluepay::Auth.new(
|
54
|
+
amount: 5500, # $55.00
|
55
|
+
source: card
|
56
|
+
).create!
|
57
|
+
|
58
|
+
auth.trans_id
|
59
|
+
#=> "10080152349"
|
60
|
+
auth.message
|
61
|
+
#=> 'Approved Auth'
|
62
|
+
|
63
|
+
capture = Bluepay::Capture.new(
|
64
|
+
rrno: auth.trans_id
|
65
|
+
).create!
|
66
|
+
|
67
|
+
capture.trans_id
|
68
|
+
#=> "10080252348"
|
69
|
+
capture.message
|
70
|
+
#=> 'Approved Capture'
|
71
|
+
|
72
|
+
sale = Bluepay::Sale.new(
|
73
|
+
amount: 2500,
|
74
|
+
responsetype: 'DIRECT',
|
75
|
+
source: card
|
76
|
+
).create!
|
77
|
+
|
78
|
+
void = Bluepay::Void.create!(
|
79
|
+
rrno: sale.trans_id
|
80
|
+
)
|
81
|
+
|
82
|
+
sale = Bluepay::Sale.new(
|
83
|
+
amount: 2500,
|
84
|
+
responsetype: 'DIRECT',
|
85
|
+
source: card
|
86
|
+
).create!
|
87
|
+
|
88
|
+
# NOTE: Cannot change amount unless the sale is settled.
|
89
|
+
refund = Bluepay::Refund.create!(
|
90
|
+
rrno: sale.trans_id,
|
91
|
+
amount: 1000
|
92
|
+
)
|
93
|
+
|
94
|
+
refund.message
|
95
|
+
#=> "Approved Void" or "Approved Refund" # depends on if settled.
|
50
96
|
|
51
97
|
report = Bluepay::Report.generate!(
|
52
98
|
query_by_settlement: true,
|
@@ -152,14 +198,31 @@ Bluepay uses the Central Timezone (US). Some parameters will convert time/date
|
|
152
198
|
like objects to strings but will use the given objects hours. As such, you must
|
153
199
|
pass in approriate date or time objects in Central Timezone or offset.
|
154
200
|
|
201
|
+
### Voids and Refunds
|
202
|
+
|
203
|
+
Voids work on unsettled transactions. Refunds work on settled transactions.
|
204
|
+
|
205
|
+
That being said, you can Refund the full amount of an unsettled transaction, but
|
206
|
+
if the amount is changed it will fail with a `message` of
|
207
|
+
`Refund/VOID amount cannot exceed original charge amount`.
|
208
|
+
|
209
|
+
|
155
210
|
## TODOS
|
156
211
|
|
157
212
|
- Response Parameter Conversion (i.e. "10.00" to 1000)
|
213
|
+
- Rebilling
|
158
214
|
|
159
215
|
|
160
|
-
## Bluepay Documentation
|
216
|
+
## Bluepay Links and Documentation
|
161
217
|
|
218
|
+
Links
|
219
|
+
- https://secure.bluepay.com/login
|
162
220
|
|
221
|
+
Documentation
|
222
|
+
- https://www.bluepay.com/developers/full-api-documentation/
|
223
|
+
- https://www.bluepay.com/developers/testing/
|
224
|
+
|
225
|
+
APIs
|
163
226
|
- https://www.bluepay.com/sites/default/files/documentation/BluePay_bp10emu/BluePay%201-0%20Emulator.txt
|
164
227
|
- https://www.bluepay.com/sites/default/files/documentation/BluePay_stq/BluePay_Single_Transaction_Query.txt
|
165
228
|
- https://www.bluepay.com/sites/default/files/documentation/BluePay_bpdailyreport2/bpdailyreport2.pdf
|
@@ -173,6 +236,10 @@ prompt that will allow you to experiment.
|
|
173
236
|
The gem doesn't come with default credentials for BluePay. You will need to
|
174
237
|
provide those
|
175
238
|
|
239
|
+
### Bluepay Test Forms
|
240
|
+
|
241
|
+
https://www.bluepay.com/sites/default/files/documentation/bpdailyreport2formHMAC_SHA512.htm
|
242
|
+
|
176
243
|
## Testing
|
177
244
|
|
178
245
|
Add a `.env` to run tests.
|
data/lib/bluepay/version.rb
CHANGED
data/lib/bluepay/void.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bluepay-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binding_of_caller
|
@@ -78,10 +78,12 @@ files:
|
|
78
78
|
- lib/bluepay/auth.rb
|
79
79
|
- lib/bluepay/bank_account.rb
|
80
80
|
- lib/bluepay/base.rb
|
81
|
+
- lib/bluepay/capture.rb
|
81
82
|
- lib/bluepay/card.rb
|
82
83
|
- lib/bluepay/interface.rb
|
83
84
|
- lib/bluepay/parameters.rb
|
84
85
|
- lib/bluepay/rb.rb
|
86
|
+
- lib/bluepay/refund.rb
|
85
87
|
- lib/bluepay/report.rb
|
86
88
|
- lib/bluepay/request.rb
|
87
89
|
- lib/bluepay/response.rb
|
@@ -90,6 +92,7 @@ files:
|
|
90
92
|
- lib/bluepay/transaction.rb
|
91
93
|
- lib/bluepay/transaction_base.rb
|
92
94
|
- lib/bluepay/version.rb
|
95
|
+
- lib/bluepay/void.rb
|
93
96
|
homepage: https://github.com/nearapogee/bluepay-rb
|
94
97
|
licenses:
|
95
98
|
- MIT
|
@@ -113,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
116
|
- !ruby/object:Gem::Version
|
114
117
|
version: '0'
|
115
118
|
requirements: []
|
116
|
-
rubygems_version: 3.
|
119
|
+
rubygems_version: 3.1.2
|
117
120
|
signing_key:
|
118
121
|
specification_version: 4
|
119
122
|
summary: Simple Bluepay API Wrapper
|