propay_client 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/Gemfile.lock +54 -1
- data/README.md +237 -2
- data/fixtures/vcr_cassettes/account_renewal_success.yml +39 -0
- data/fixtures/vcr_cassettes/card_creation_success.yml +41 -0
- data/fixtures/vcr_cassettes/document_upload_success.yml +40 -0
- data/fixtures/vcr_cassettes/edit_merchant_address_success.yml +41 -0
- data/fixtures/vcr_cassettes/edit_merchant_bank_account_success.yml +40 -0
- data/fixtures/vcr_cassettes/edit_merchant_business_info_success.yml +40 -0
- data/fixtures/vcr_cassettes/edit_merchant_contact_info_success.yml +39 -0
- data/fixtures/vcr_cassettes/edit_merchant_credit_limit_success.yml +39 -0
- data/fixtures/vcr_cassettes/edit_merchant_gross_settle_payment_info_success.yml +41 -0
- data/fixtures/vcr_cassettes/edit_merchant_renewal_payment_method_success.yml +39 -0
- data/fixtures/vcr_cassettes/edit_merchant_services_success.yml +39 -0
- data/fixtures/vcr_cassettes/edit_merchant_status_success.yml +39 -0
- data/fixtures/vcr_cassettes/merchant_balance_success.yml +39 -0
- data/fixtures/vcr_cassettes/payment_propay_to_propay_success.yml +40 -0
- data/fixtures/vcr_cassettes/payment_timed_pull_success.yml +40 -0
- data/fixtures/vcr_cassettes/pushes_funds_to_flash_funds_card_success.yml +39 -0
- data/lib/propay_client.rb +1 -0
- data/lib/propay_client/api.rb +26 -2
- data/lib/propay_client/resources.rb +5 -0
- data/lib/propay_client/resources/account.rb +7 -0
- data/lib/propay_client/resources/card.rb +15 -0
- data/lib/propay_client/resources/document.rb +7 -0
- data/lib/propay_client/resources/merchant.rb +48 -0
- data/lib/propay_client/resources/payment.rb +11 -0
- data/lib/propay_client/version.rb +1 -1
- metadata +24 -3
- data/lib/propay_client/api/merchant.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c6c3988b9175b36514dde32f96fcd32f76e6068fbcd50df607e24e1762d321c
|
4
|
+
data.tar.gz: 0b5e0718ff7b0a885f16cd4b27728af287664fb9822ff37f2e269a78edc4243b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec1213a0d7b4e355deddb6d62bf29a17a7116993f354dd4bb2975bf6d62ee497c9fd457a8cfccd64cc9466e7202c719fc90e62cc3fc4f9c2551c37185ff6289d
|
7
|
+
data.tar.gz: 2e4800e05908b1a73bdd47f5438407aa7d8d5e3e410733a1b888e1fc9db84a958c863b53071fae30f0f501a2fb3ee5b18fdf867866b1c5b9709713edd7925752
|
data/Gemfile
CHANGED
@@ -9,3 +9,7 @@ gem "excon", "~> 0.75.0"
|
|
9
9
|
gem "factory_bot"
|
10
10
|
gem "dotenv-rails", groups: [:development, :test]
|
11
11
|
gem "vcr", "~> 6.0", groups: [:development, :test]
|
12
|
+
gem "awesome_print", "~> 1.8.0"
|
13
|
+
|
14
|
+
gem 'travis', '~> 1.8', '>= 1.8.8'
|
15
|
+
gem 'codecov', require: false, group: 'test'
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
propay_client (0.
|
4
|
+
propay_client (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -25,28 +25,62 @@ GEM
|
|
25
25
|
minitest (~> 5.1)
|
26
26
|
tzinfo (~> 1.1)
|
27
27
|
zeitwerk (~> 2.2, >= 2.2.2)
|
28
|
+
addressable (2.4.0)
|
29
|
+
awesome_print (1.8.0)
|
30
|
+
backports (3.18.1)
|
28
31
|
builder (3.2.4)
|
32
|
+
codecov (0.2.1)
|
33
|
+
colorize
|
34
|
+
json
|
35
|
+
simplecov
|
36
|
+
colorize (0.8.1)
|
29
37
|
concurrent-ruby (1.1.6)
|
30
38
|
crass (1.0.6)
|
31
39
|
diff-lcs (1.4.4)
|
40
|
+
docile (1.3.2)
|
32
41
|
dotenv (2.7.6)
|
33
42
|
dotenv-rails (2.7.6)
|
34
43
|
dotenv (= 2.7.6)
|
35
44
|
railties (>= 3.2)
|
36
45
|
erubi (1.9.0)
|
46
|
+
ethon (0.12.0)
|
47
|
+
ffi (>= 1.3.0)
|
37
48
|
excon (0.75.0)
|
38
49
|
factory_bot (6.1.0)
|
39
50
|
activesupport (>= 5.0.0)
|
51
|
+
faraday (0.17.3)
|
52
|
+
multipart-post (>= 1.2, < 3)
|
53
|
+
faraday_middleware (0.14.0)
|
54
|
+
faraday (>= 0.7.4, < 1.0)
|
55
|
+
ffi (1.13.1)
|
56
|
+
gh (0.15.1)
|
57
|
+
addressable (~> 2.4.0)
|
58
|
+
backports
|
59
|
+
faraday (~> 0.8)
|
60
|
+
multi_json (~> 1.0)
|
61
|
+
net-http-persistent (~> 2.9)
|
62
|
+
net-http-pipeline
|
63
|
+
highline (1.7.10)
|
40
64
|
i18n (1.8.3)
|
41
65
|
concurrent-ruby (~> 1.0)
|
66
|
+
json (2.3.1)
|
67
|
+
launchy (2.4.3)
|
68
|
+
addressable (~> 2.3)
|
42
69
|
loofah (2.6.0)
|
43
70
|
crass (~> 1.0.2)
|
44
71
|
nokogiri (>= 1.5.9)
|
45
72
|
method_source (1.0.0)
|
46
73
|
mini_portile2 (2.4.0)
|
47
74
|
minitest (5.14.1)
|
75
|
+
multi_json (1.15.0)
|
76
|
+
multipart-post (2.1.1)
|
77
|
+
net-http-persistent (2.9.4)
|
78
|
+
net-http-pipeline (1.0.1)
|
48
79
|
nokogiri (1.10.10)
|
49
80
|
mini_portile2 (~> 2.4.0)
|
81
|
+
pusher-client (0.6.2)
|
82
|
+
json
|
83
|
+
websocket (~> 1.0)
|
50
84
|
rack (2.2.3)
|
51
85
|
rack-test (1.1.0)
|
52
86
|
rack (>= 1.0, < 3)
|
@@ -75,23 +109,42 @@ GEM
|
|
75
109
|
diff-lcs (>= 1.2.0, < 2.0)
|
76
110
|
rspec-support (~> 3.9.0)
|
77
111
|
rspec-support (3.9.3)
|
112
|
+
simplecov (0.18.5)
|
113
|
+
docile (~> 1.1)
|
114
|
+
simplecov-html (~> 0.11)
|
115
|
+
simplecov-html (0.12.2)
|
78
116
|
thor (1.0.1)
|
79
117
|
thread_safe (0.3.6)
|
118
|
+
travis (1.8.13)
|
119
|
+
backports
|
120
|
+
faraday (~> 0.9)
|
121
|
+
faraday_middleware (~> 0.9, >= 0.9.1)
|
122
|
+
gh (~> 0.13)
|
123
|
+
highline (~> 1.6)
|
124
|
+
launchy (~> 2.1)
|
125
|
+
pusher-client (~> 0.4)
|
126
|
+
typhoeus (~> 0.6, >= 0.6.8)
|
127
|
+
typhoeus (0.8.0)
|
128
|
+
ethon (>= 0.8.0)
|
80
129
|
tzinfo (1.2.7)
|
81
130
|
thread_safe (~> 0.1)
|
82
131
|
vcr (6.0.0)
|
132
|
+
websocket (1.2.8)
|
83
133
|
zeitwerk (2.4.0)
|
84
134
|
|
85
135
|
PLATFORMS
|
86
136
|
ruby
|
87
137
|
|
88
138
|
DEPENDENCIES
|
139
|
+
awesome_print (~> 1.8.0)
|
140
|
+
codecov
|
89
141
|
dotenv-rails
|
90
142
|
excon (~> 0.75.0)
|
91
143
|
factory_bot
|
92
144
|
propay_client!
|
93
145
|
rake (~> 12.0)
|
94
146
|
rspec (~> 3.0)
|
147
|
+
travis (~> 1.8, >= 1.8.8)
|
95
148
|
vcr (~> 6.0)
|
96
149
|
|
97
150
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# PropayClient
|
2
2
|
|
3
|
+
[![Gem Version](https://img.shields.io/gem/v/propay_client)](https://github.com/nikneroz/propay_client)
|
4
|
+
[![Downloads](https://img.shields.io/gem/dt/propay_client)](https://github.com/nikneroz/propay_client)
|
5
|
+
[![Build](https://img.shields.io/travis/com/nikneroz/propay_client)](https://travis-ci.com/github/nikneroz/propay_client)
|
6
|
+
[![CodeCov](https://img.shields.io/codecov/c/github/nikneroz/propay_client)](https://codecov.io/gh/nikneroz/propay_client)
|
7
|
+
|
3
8
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/propay_client`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
9
|
|
5
10
|
TODO: Delete this and the text above, and describe your gem
|
@@ -9,7 +14,7 @@ TODO: Delete this and the text above, and describe your gem
|
|
9
14
|
Add this line to your application's Gemfile:
|
10
15
|
|
11
16
|
```ruby
|
12
|
-
gem 'propay_client'
|
17
|
+
gem 'propay_client', '~> 0.2.0'
|
13
18
|
```
|
14
19
|
|
15
20
|
And then execute:
|
@@ -22,7 +27,7 @@ Or install it yourself as:
|
|
22
27
|
|
23
28
|
## Usage
|
24
29
|
|
25
|
-
```
|
30
|
+
```ruby
|
26
31
|
# config/initializers/propay_client.rb
|
27
32
|
|
28
33
|
require 'propay_client'
|
@@ -33,10 +38,240 @@ PropayClient.configure do |config|
|
|
33
38
|
end
|
34
39
|
```
|
35
40
|
|
41
|
+
### Merchant
|
42
|
+
[Documentation](https://www.propay.com/en-US/Documents/API-Docs/ProPay-API-Manual-REST)
|
43
|
+
|
44
|
+
#### Creation
|
45
|
+
```ruby
|
46
|
+
# Account Creation
|
47
|
+
PropayClient::Merchant.create(params)
|
48
|
+
|
49
|
+
# Get current ProPay Account Balance
|
50
|
+
account_number = 123456
|
51
|
+
body = PropayClient::Merchant.balance(account_number)
|
52
|
+
|
53
|
+
# Account Renewal
|
54
|
+
params = {
|
55
|
+
"accountNum" => 123456,
|
56
|
+
"CVV2" => 999,
|
57
|
+
"tier" => "194e4047-69b5-4e7c-b",
|
58
|
+
"ccNum" => "4111111111111111",
|
59
|
+
"expDate" =>"1221",
|
60
|
+
"zip" => "12345"
|
61
|
+
}
|
62
|
+
PropayClient::Account.renewal(params)
|
63
|
+
|
64
|
+
# Document Upload
|
65
|
+
params = {
|
66
|
+
"accountNum" => 123456,
|
67
|
+
"DocumentName" => "Chargeback 1234",
|
68
|
+
"TransactionReference" => "100",
|
69
|
+
"Document" => "BASE64 STRING LESS THAN 5MB",
|
70
|
+
"DocType" => "jpg",
|
71
|
+
"Identification" => "Null"
|
72
|
+
}
|
73
|
+
PropayClient::Document.upload(params)
|
74
|
+
|
75
|
+
# Flash Funds - Add or Change Card Assigned to a ProPay Account
|
76
|
+
params = {
|
77
|
+
"ccNum" => "<card number>",
|
78
|
+
"expDate" => "1020",
|
79
|
+
"accountNum" => 718045866,
|
80
|
+
"CVV2" => "022",
|
81
|
+
"cardholderName" => "Clint Eastwood",
|
82
|
+
"addr" => "900 Metro Center Blv",
|
83
|
+
"zip" => "94404",
|
84
|
+
"state" => "CA",
|
85
|
+
"city" => "San Fransisco"
|
86
|
+
}
|
87
|
+
PropayClient::Card.create(123456, params)
|
88
|
+
PropayClient::Card.update(123456, params)
|
89
|
+
|
90
|
+
# Flash Funds –Push Funds to On-File Card
|
91
|
+
params = {
|
92
|
+
"accountNum" => 123456,
|
93
|
+
"amount" => "1000"
|
94
|
+
}
|
95
|
+
PropayClient::Card.push_funds_to_flash_funds_card(123456, params)
|
96
|
+
|
97
|
+
# ProPay Account Payment Disbursement
|
98
|
+
params = {
|
99
|
+
"amount": 100,
|
100
|
+
"invNum": "Test Invoice Number",
|
101
|
+
"comment1":"Test Comment 1",
|
102
|
+
"comment2":"Test Comment 2",
|
103
|
+
"recAccntNum": "123456"
|
104
|
+
}
|
105
|
+
body = PropayClient::Payment.propay_to_propay(params)
|
106
|
+
|
107
|
+
# SplitFunds froma ProPay Transaction(Timed Pull)
|
108
|
+
params = {
|
109
|
+
"accountNum" => 123456,
|
110
|
+
"recAccntNum" => 987654,
|
111
|
+
"amount" => 100,
|
112
|
+
"transNum" => 2,
|
113
|
+
"invNum" => "Invoice",
|
114
|
+
"comment1" => "Test Comments",
|
115
|
+
"comment2" => "Test Comments2"
|
116
|
+
}
|
117
|
+
body = PropayClient::Payment.timed_pull(params)
|
118
|
+
```
|
119
|
+
|
120
|
+
#### Editing
|
121
|
+
```ruby
|
122
|
+
# Contact Info
|
123
|
+
params = {
|
124
|
+
"AccountNumber" => 123456,
|
125
|
+
"PersonalData" => {
|
126
|
+
"FirstName" => "Bob",
|
127
|
+
"MiddleInitial" => "N",
|
128
|
+
"LastName" => "Takanawa",
|
129
|
+
"SourceEmail" => "200514042252msedit@propay.com",
|
130
|
+
"PhoneInformation" => {
|
131
|
+
"DayPhone" => 8015555555,
|
132
|
+
"EveningPhone" => 8015555555}
|
133
|
+
},
|
134
|
+
"ExternalId" => "200514042252"
|
135
|
+
}
|
136
|
+
PropayClient::Merchant.edit_contact_info(123456, params)
|
137
|
+
|
138
|
+
# Address
|
139
|
+
params = {
|
140
|
+
"AccountNumber" => 123456,
|
141
|
+
"Address" => {
|
142
|
+
"ApartmentNumber" => "K",
|
143
|
+
"Address1" => "123 New Street",
|
144
|
+
"Address2" => "Some address2",
|
145
|
+
"City" => "LA",
|
146
|
+
"State" => "CA",
|
147
|
+
"Country" => "USA",
|
148
|
+
"Zip" => "90210"
|
149
|
+
},
|
150
|
+
"MailAddress": {
|
151
|
+
"ApartmentNumber": nil,
|
152
|
+
"Address1" => "PO Box 111",
|
153
|
+
"Address2" => "Some street",
|
154
|
+
"City" => "LA",
|
155
|
+
"State" => "CA",
|
156
|
+
"Country" => "USA",
|
157
|
+
"Zip" => "90210"
|
158
|
+
}
|
159
|
+
}
|
160
|
+
PropayClient::Merchant.edit_address(123456, params)
|
161
|
+
|
162
|
+
# Renewal Payment Method
|
163
|
+
params = {
|
164
|
+
"AccountNumber" => 123456,
|
165
|
+
"CreditCardData" => nil,
|
166
|
+
"PaymentBank" => {
|
167
|
+
"AccountNumber" => "7654321",
|
168
|
+
"RoutingNumber" => "324079555",
|
169
|
+
"AccountType" => "Savings"
|
170
|
+
}
|
171
|
+
}
|
172
|
+
PropayClient::Merchant.edit_renewal_payment_method(123456, params)
|
173
|
+
|
174
|
+
# Business Info
|
175
|
+
params = {
|
176
|
+
"AccountNumber" => 123456,
|
177
|
+
"AuthorizedSignerFirstName" => "TestFirstName",
|
178
|
+
"AuthorizedSignerLastName" => "TestLastName",
|
179
|
+
"AuthorizedSignerTitle" => "TestTitle",
|
180
|
+
"BusinessData" => {
|
181
|
+
"BusinessLegalName" => "Testlegalname",
|
182
|
+
"DoingBusinessAs" => "TestDBA",
|
183
|
+
"EIN" => "584384656",
|
184
|
+
"WebsiteURL" => "www.test.com",
|
185
|
+
"BusinessDescription" => "Test description",
|
186
|
+
"MonthlyBankCardVolume" => 9000,
|
187
|
+
"HighestTicket" => 1000
|
188
|
+
},
|
189
|
+
"BusinessAddress" => {
|
190
|
+
"ApartmentNumber" => nil,
|
191
|
+
"Address1" => "AddressLine1",
|
192
|
+
"Address2" => "AddressLine2",
|
193
|
+
"City" => "TestCity",
|
194
|
+
"State" => "CA",
|
195
|
+
"Country": nil,
|
196
|
+
"Zip" => "13245"
|
197
|
+
}
|
198
|
+
}
|
199
|
+
PropayClient::Merchant.edit_business_info(123456, params)
|
200
|
+
|
201
|
+
# Bank Account
|
202
|
+
params = {
|
203
|
+
"AccountNumber" => 123456,
|
204
|
+
"IsSecondaryBankAccount" => false,
|
205
|
+
"BankAccount" => {
|
206
|
+
"AccountCountryCode" => "USA",
|
207
|
+
"BankAccountNumber" => 111111111,
|
208
|
+
"RoutingNumber" => "091000019",
|
209
|
+
"AccountOwnershipType" => "Business",
|
210
|
+
"BankName" => "Bank Name",
|
211
|
+
"AccountType" => "Checking"
|
212
|
+
}
|
213
|
+
}
|
214
|
+
PropayClient::Merchant.edit_bank_account(123456, params)
|
215
|
+
|
216
|
+
# Gross Settle Payment Info
|
217
|
+
params = {
|
218
|
+
"AccountNumber" => 123456,
|
219
|
+
"GrossBillingInformation" => {
|
220
|
+
"GrossSettleBankAccount" => nil,
|
221
|
+
"GrossSettleAddress" => {
|
222
|
+
"Address1" =>"123 Main Stree",
|
223
|
+
"City" =>"LA",
|
224
|
+
"State" =>"CA",
|
225
|
+
"Country" =>"USA",
|
226
|
+
"Zip" =>"90210"
|
227
|
+
},
|
228
|
+
"GrossSettleCardData" =>{
|
229
|
+
"NameOnCard" =>"Bo Diddley",
|
230
|
+
"CreditCardNumber" =>"<credit card number>",
|
231
|
+
"ExpirationDate" =>"0522"
|
232
|
+
},
|
233
|
+
"GrossSettlePropayAccount" => nil
|
234
|
+
}
|
235
|
+
}
|
236
|
+
PropayClient::Merchant.edit_gross_settle_payment_info(123456, params)
|
237
|
+
|
238
|
+
# Services
|
239
|
+
params = {
|
240
|
+
"AccountNumber" => 123456,
|
241
|
+
"CcProcessing" => true,
|
242
|
+
"ACHOut" => true,
|
243
|
+
"ACHIn" => true,
|
244
|
+
"ProPayOut" => true,
|
245
|
+
"ProPayIn" => true,
|
246
|
+
"SoftLimitEnabled" => "y",
|
247
|
+
"AchPaymentSoftLimitEnabled" => "y",
|
248
|
+
"CreditCardMonthLimit" => 0,
|
249
|
+
"CreditCardTransactionLimit" => 0,
|
250
|
+
"SoftLimitAchOffPercent" => 0,
|
251
|
+
"AchPaymentAchOffPercent" => 0
|
252
|
+
}
|
253
|
+
PropayClient::Merchant.edit_services(123456, params)
|
254
|
+
|
255
|
+
# Status
|
256
|
+
params = {
|
257
|
+
"AccountNumber" => 123456,
|
258
|
+
"MerchantStatus" => "Canceled"
|
259
|
+
}
|
260
|
+
PropayClient::Merchant.edit_status(123456, params)
|
261
|
+
|
262
|
+
# Credit Limit
|
263
|
+
params = {
|
264
|
+
"AccountNumber" => 123456,
|
265
|
+
"CreditLimit" => 1000
|
266
|
+
}
|
267
|
+
PropayClient::Merchant.edit_credit_limit(123456, params)
|
268
|
+
```
|
269
|
+
|
36
270
|
### API Authorization.
|
37
271
|
You will need to get personal certificate. Convert this to token and use for API requests.
|
38
272
|
[Documentation](https://www.propay.com/en-US/Documents/API-Docs/ProtectPay-API-Manual-REST "ProtectPay-API-Manual-REST")
|
39
273
|
|
274
|
+
|
40
275
|
```
|
41
276
|
The REST interface uses Basic HTTP Authentication for API requests, with the CertStr as the username and the TermId as the password. This must be added to the HTTP header as the value of the ‘Authorization’ field. Creating the Authorization Header value requires the following steps:
|
42
277
|
1. Combine the CertStr, a Colon, and the termId (MyCertStr:MyTermId). If a termId has not been provided only use the CertStr without a colon
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayapi/renewal
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"accountNum":123456,"CVV2":999,"tier":"194e4047-69b5-4e7c-b","ccNum":"4111111111111111","expDate":"1221","zip":"12345"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Basic <API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
Cache-Control:
|
20
|
+
- private
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/10.0
|
25
|
+
Set-Cookie:
|
26
|
+
- ASP.NET_SessionId=hjerll21zyzo2spgh5nm4zeu; path=/; HttpOnly
|
27
|
+
X-AspNet-Version:
|
28
|
+
- 4.0.30319
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Date:
|
32
|
+
- Thu, 16 Jul 2020 16:15:24 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '45'
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"AccountNumber":123456,"Status":"59","Tier":"194e4047-69b5-4e7c-b"}'
|
38
|
+
recorded_at: Thu, 16 Jul 2020 16:15:24 GMT
|
39
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayapi/FlashFundsCard/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"ccNum":"<card number>","expDate":"1020","accountNum":718045866,"CVV2":"022","cardholderName":"Clint
|
9
|
+
Eastwood","addr":"900 Metro Center Blv","zip":"94404","state":"CA","city":"San
|
10
|
+
Fransisco"}'
|
11
|
+
headers:
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic <API_KEY>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 409
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- private
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Server:
|
26
|
+
- Microsoft-IIS/10.0
|
27
|
+
Set-Cookie:
|
28
|
+
- ASP.NET_SessionId=yvv2mitqgv40qetimhwezfz5; path=/; HttpOnly
|
29
|
+
X-AspNet-Version:
|
30
|
+
- 4.0.30319
|
31
|
+
X-Powered-By:
|
32
|
+
- ASP.NET
|
33
|
+
Date:
|
34
|
+
- Thu, 16 Jul 2020 16:35:13 GMT
|
35
|
+
Content-Length:
|
36
|
+
- '33'
|
37
|
+
body:
|
38
|
+
encoding: ASCII-8BIT
|
39
|
+
string: '{"AccountNumber":123456,"Status":"79"}'
|
40
|
+
recorded_at: Thu, 16 Jul 2020 16:35:13 GMT
|
41
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayapi/DocumentUpload
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"accountNum":123456,"DocumentName":"Chargeback 1234","TransactionReference":"100","Document":"BASE64
|
9
|
+
STRING LESS THAN 5MB","DocType":"jpg","Identification":"Null"}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Authorization:
|
14
|
+
- Basic <API_KEY>
|
15
|
+
response:
|
16
|
+
status:
|
17
|
+
code: 200
|
18
|
+
message:
|
19
|
+
headers:
|
20
|
+
Cache-Control:
|
21
|
+
- private
|
22
|
+
Content-Type:
|
23
|
+
- application/json; charset=utf-8
|
24
|
+
Server:
|
25
|
+
- Microsoft-IIS/10.0
|
26
|
+
Set-Cookie:
|
27
|
+
- ASP.NET_SessionId=nobt4qxsomolqmzdzw5heomd; path=/; HttpOnly
|
28
|
+
X-AspNet-Version:
|
29
|
+
- 4.0.30319
|
30
|
+
X-Powered-By:
|
31
|
+
- ASP.NET
|
32
|
+
Date:
|
33
|
+
- Thu, 16 Jul 2020 16:24:41 GMT
|
34
|
+
Content-Length:
|
35
|
+
- '33'
|
36
|
+
body:
|
37
|
+
encoding: ASCII-8BIT
|
38
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
39
|
+
recorded_at: Thu, 16 Jul 2020 16:24:41 GMT
|
40
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantAddress/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"Address":{"ApartmentNumber":"K","Address1":"123
|
9
|
+
New Street","Address2":"Some address2","City":"LA","State":"CA","Country":"USA","Zip":"90210"},"MailAddress":{"ApartmentNumber":null,"Address1":"PO
|
10
|
+
Box 111","Address2":"Some street","City":"LA","State":"CA","Country":"USA","Zip":"90210"}}'
|
11
|
+
headers:
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic <API_KEY>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- private
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Server:
|
26
|
+
- Microsoft-IIS/10.0
|
27
|
+
Set-Cookie:
|
28
|
+
- ASP.NET_SessionId=fmwrd3daush52cb5x5gy5jc4; path=/; HttpOnly
|
29
|
+
X-AspNet-Version:
|
30
|
+
- 4.0.30319
|
31
|
+
X-Powered-By:
|
32
|
+
- ASP.NET
|
33
|
+
Date:
|
34
|
+
- Thu, 16 Jul 2020 13:37:28 GMT
|
35
|
+
Content-Length:
|
36
|
+
- '38'
|
37
|
+
body:
|
38
|
+
encoding: ASCII-8BIT
|
39
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
40
|
+
recorded_at: Thu, 16 Jul 2020 13:37:28 GMT
|
41
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantBankAccount/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"IsSecondaryBankAccount":false,"BankAccount":{"AccountCountryCode":"USA","BankAccountNumber":111111111,"RoutingNumber":"091000019","AccountOwnershipType":"Business","BankName":"Bank
|
9
|
+
Name","AccountType":"Checking"}}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Authorization:
|
14
|
+
- Basic <API_KEY>
|
15
|
+
response:
|
16
|
+
status:
|
17
|
+
code: 200
|
18
|
+
message:
|
19
|
+
headers:
|
20
|
+
Cache-Control:
|
21
|
+
- private
|
22
|
+
Content-Type:
|
23
|
+
- application/json; charset=utf-8
|
24
|
+
Server:
|
25
|
+
- Microsoft-IIS/10.0
|
26
|
+
Set-Cookie:
|
27
|
+
- ASP.NET_SessionId=0vpi4pg1lb4y0xqhzlxofetf; path=/; HttpOnly
|
28
|
+
X-AspNet-Version:
|
29
|
+
- 4.0.30319
|
30
|
+
X-Powered-By:
|
31
|
+
- ASP.NET
|
32
|
+
Date:
|
33
|
+
- Thu, 16 Jul 2020 15:54:58 GMT
|
34
|
+
Content-Length:
|
35
|
+
- '38'
|
36
|
+
body:
|
37
|
+
encoding: ASCII-8BIT
|
38
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
39
|
+
recorded_at: Thu, 16 Jul 2020 15:54:59 GMT
|
40
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantBusinessInfo/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"AuthorizedSignerFirstName":"TestFirstName","AuthorizedSignerLastName":"TestLastName","AuthorizedSignerTitle":"TestTitle","BusinessData":{"BusinessLegalName":"Testlegalname","DoingBusinessAs":"TestDBA","EIN":"584384656","WebsiteURL":"www.test.com","BusinessDescription":"Test
|
9
|
+
description","MonthlyBankCardVolume":9000,"HighestTicket":1000},"BusinessAddress":{"ApartmentNumber":null,"Address1":"AddressLine1","Address2":"AddressLine2","City":"TestCity","State":"CA","Country":null,"Zip":"13245"}}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Authorization:
|
14
|
+
- Basic <API_KEY>
|
15
|
+
response:
|
16
|
+
status:
|
17
|
+
code: 200
|
18
|
+
message:
|
19
|
+
headers:
|
20
|
+
Cache-Control:
|
21
|
+
- private
|
22
|
+
Content-Type:
|
23
|
+
- application/json; charset=utf-8
|
24
|
+
Server:
|
25
|
+
- Microsoft-IIS/10.0
|
26
|
+
Set-Cookie:
|
27
|
+
- ASP.NET_SessionId=sblxjhhd2agc0dnyn1q2530g; path=/; HttpOnly
|
28
|
+
X-AspNet-Version:
|
29
|
+
- 4.0.30319
|
30
|
+
X-Powered-By:
|
31
|
+
- ASP.NET
|
32
|
+
Date:
|
33
|
+
- Thu, 16 Jul 2020 15:51:26 GMT
|
34
|
+
Content-Length:
|
35
|
+
- '38'
|
36
|
+
body:
|
37
|
+
encoding: ASCII-8BIT
|
38
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
39
|
+
recorded_at: Thu, 16 Jul 2020 15:51:26 GMT
|
40
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantContactInfo/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"PersonalData":{"FirstName":"Bob","MiddleInitial":"N","LastName":"Takanawa","SourceEmail":"200514042252msedit@propay.com","PhoneInformation":{"DayPhone":8015555555,"EveningPhone":8015555555}},"ExternalId":"200514042252"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Basic <API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
Cache-Control:
|
20
|
+
- private
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/10.0
|
25
|
+
Set-Cookie:
|
26
|
+
- ASP.NET_SessionId=noxzagagua3utpyzqccdompg; path=/; HttpOnly
|
27
|
+
X-AspNet-Version:
|
28
|
+
- 4.0.30319
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Date:
|
32
|
+
- Thu, 16 Jul 2020 13:22:58 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '38'
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
38
|
+
recorded_at: Thu, 16 Jul 2020 13:22:57 GMT
|
39
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantCreditLimit/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"CreditLimit":1000}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Basic <API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
Cache-Control:
|
20
|
+
- private
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/10.0
|
25
|
+
Set-Cookie:
|
26
|
+
- ASP.NET_SessionId=mcdi4yvuoiqeafn5ajwrphg4; path=/; HttpOnly
|
27
|
+
X-AspNet-Version:
|
28
|
+
- 4.0.30319
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Date:
|
32
|
+
- Thu, 16 Jul 2020 16:09:26 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '38'
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
38
|
+
recorded_at: Thu, 16 Jul 2020 16:09:26 GMT
|
39
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantGrossSettleBilling/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"GrossBillingInformation":{"GrossSettleBankAccount":null,"GrossSettleAddress":{"Address1":"123
|
9
|
+
Main Stree","City":"LA","State":"CA","Country":"USA","Zip":"90210"},"GrossSettleCardData":{"NameOnCard":"Bo
|
10
|
+
Diddley","CreditCardNumber":"<credit card number>","ExpirationDate":"0522"},"GrossSettlePropayAccount":null}}'
|
11
|
+
headers:
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic <API_KEY>
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- private
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Server:
|
26
|
+
- Microsoft-IIS/10.0
|
27
|
+
Set-Cookie:
|
28
|
+
- ASP.NET_SessionId=x31xc2em3e00h2e5h1l1by23; path=/; HttpOnly
|
29
|
+
X-AspNet-Version:
|
30
|
+
- 4.0.30319
|
31
|
+
X-Powered-By:
|
32
|
+
- ASP.NET
|
33
|
+
Date:
|
34
|
+
- Thu, 16 Jul 2020 15:59:31 GMT
|
35
|
+
Content-Length:
|
36
|
+
- '38'
|
37
|
+
body:
|
38
|
+
encoding: ASCII-8BIT
|
39
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
40
|
+
recorded_at: Thu, 16 Jul 2020 15:59:32 GMT
|
41
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantPaymentInformation/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"CreditCardData":null,"PaymentBank":{"AccountNumber":"7654321","RoutingNumber":"324079555","AccountType":"Savings"}}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Basic <API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
Cache-Control:
|
20
|
+
- private
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/10.0
|
25
|
+
Set-Cookie:
|
26
|
+
- ASP.NET_SessionId=b3bxttgfxe1brcqiz3bsg4cb; path=/; HttpOnly
|
27
|
+
X-AspNet-Version:
|
28
|
+
- 4.0.30319
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Date:
|
32
|
+
- Thu, 16 Jul 2020 15:41:24 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '38'
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
38
|
+
recorded_at: Thu, 16 Jul 2020 15:41:23 GMT
|
39
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantServices/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"CcProcessing":true,"ACHOut":true,"ACHIn":true,"ProPayOut":true,"ProPayIn":true,"SoftLimitEnabled":"y","AchPaymentSoftLimitEnabled":"y","CreditCardMonthLimit":0,"CreditCardTransactionLimit":0,"SoftLimitAchOffPercent":0,"AchPaymentAchOffPercent":0}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Basic <API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
Cache-Control:
|
20
|
+
- private
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/10.0
|
25
|
+
Set-Cookie:
|
26
|
+
- ASP.NET_SessionId=3jdubtfaamgor2r0zt1qg4gd; path=/; HttpOnly
|
27
|
+
X-AspNet-Version:
|
28
|
+
- 4.0.30319
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Date:
|
32
|
+
- Thu, 16 Jul 2020 16:02:49 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '38'
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"AccountNumber":123456,"Status":"65"}'
|
38
|
+
recorded_at: Thu, 16 Jul 2020 16:02:49 GMT
|
39
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantStatus/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"AccountNumber":123456,"MerchantStatus":"Canceled"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Basic <API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
Cache-Control:
|
20
|
+
- private
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/10.0
|
25
|
+
Set-Cookie:
|
26
|
+
- ASP.NET_SessionId=ywbt2xbszixurhhcaavfz4ce; path=/; HttpOnly
|
27
|
+
X-AspNet-Version:
|
28
|
+
- 4.0.30319
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Date:
|
32
|
+
- Thu, 16 Jul 2020 16:04:29 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '38'
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
38
|
+
recorded_at: Thu, 16 Jul 2020 16:04:29 GMT
|
39
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/MerchantBalanceDetails/123456
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Basic <API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
Cache-Control:
|
20
|
+
- private
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/10.0
|
25
|
+
Set-Cookie:
|
26
|
+
- ASP.NET_SessionId=vs3r0upquor4fgqjfcsk4ad0; path=/; HttpOnly
|
27
|
+
X-AspNet-Version:
|
28
|
+
- 4.0.30319
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Date:
|
32
|
+
- Thu, 16 Jul 2020 16:57:54 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '33'
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"AccountNumber":123456,"Status":"59"}'
|
38
|
+
recorded_at: Thu, 16 Jul 2020 16:57:54 GMT
|
39
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/ProPayToProPay
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"amount":100,"invNum":"Test Invoice Number","comment1":"Test Comment
|
9
|
+
1","comment2":"Test Comment 2","recAccntNum":"123456"}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Authorization:
|
14
|
+
- Basic <API_KEY>
|
15
|
+
response:
|
16
|
+
status:
|
17
|
+
code: 200
|
18
|
+
message:
|
19
|
+
headers:
|
20
|
+
Cache-Control:
|
21
|
+
- private
|
22
|
+
Content-Type:
|
23
|
+
- application/json; charset=utf-8
|
24
|
+
Server:
|
25
|
+
- Microsoft-IIS/10.0
|
26
|
+
Set-Cookie:
|
27
|
+
- ASP.NET_SessionId=kdixs05iuqpzlh5qgwc1okwv; path=/; HttpOnly
|
28
|
+
X-AspNet-Version:
|
29
|
+
- 4.0.30319
|
30
|
+
X-Powered-By:
|
31
|
+
- ASP.NET
|
32
|
+
Date:
|
33
|
+
- Thu, 16 Jul 2020 16:46:48 GMT
|
34
|
+
Content-Length:
|
35
|
+
- '55'
|
36
|
+
body:
|
37
|
+
encoding: ASCII-8BIT
|
38
|
+
string: '{"AccountNumber":123456,"Status":"59","TransactionNumber":10}'
|
39
|
+
recorded_at: Thu, 16 Jul 2020 16:46:48 GMT
|
40
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/TimedPull
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"accountNum":123456,"recAccntNum":987654,"amount":100,"transNum":2,"invNum":"Invoice","comment1":"Test
|
9
|
+
Comments","comment2":"Test Comments2"}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Authorization:
|
14
|
+
- Basic <API_KEY>
|
15
|
+
response:
|
16
|
+
status:
|
17
|
+
code: 200
|
18
|
+
message:
|
19
|
+
headers:
|
20
|
+
Cache-Control:
|
21
|
+
- private
|
22
|
+
Content-Type:
|
23
|
+
- application/json; charset=utf-8
|
24
|
+
Server:
|
25
|
+
- Microsoft-IIS/10.0
|
26
|
+
Set-Cookie:
|
27
|
+
- ASP.NET_SessionId=mnxr2jquhyvok4ka0jfoun1h; path=/; HttpOnly
|
28
|
+
X-AspNet-Version:
|
29
|
+
- 4.0.30319
|
30
|
+
X-Powered-By:
|
31
|
+
- ASP.NET
|
32
|
+
Date:
|
33
|
+
- Thu, 16 Jul 2020 16:52:24 GMT
|
34
|
+
Content-Length:
|
35
|
+
- '55'
|
36
|
+
body:
|
37
|
+
encoding: ASCII-8BIT
|
38
|
+
string: '{"AccountNumber":123456,"Status":"59","TransactionNumber":2}'
|
39
|
+
recorded_at: Thu, 16 Jul 2020 16:52:24 GMT
|
40
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://xmltestapi.propay.com/propayAPI/PushFundsToFlashFundsCard/123456
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"accountNum":718045866,"amount":"1000"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Basic <API_KEY>
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 409
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
Cache-Control:
|
20
|
+
- private
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/10.0
|
25
|
+
Set-Cookie:
|
26
|
+
- ASP.NET_SessionId=qfadvmqwavdg2a0sg51sjei4; path=/; HttpOnly
|
27
|
+
X-AspNet-Version:
|
28
|
+
- 4.0.30319
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Date:
|
32
|
+
- Thu, 16 Jul 2020 16:41:55 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '33'
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"AccountNumber":123456,"Status":"79"}'
|
38
|
+
recorded_at: Thu, 16 Jul 2020 16:41:55 GMT
|
39
|
+
recorded_with: VCR 6.0.0
|
data/lib/propay_client.rb
CHANGED
data/lib/propay_client/api.rb
CHANGED
@@ -1,4 +1,28 @@
|
|
1
|
-
|
1
|
+
module PropayClient
|
2
|
+
class API
|
3
|
+
def self.headers
|
4
|
+
{
|
5
|
+
'Content-Type' => 'application/json',
|
6
|
+
'Authorization' => "Basic #{PropayClient.configuration.api_key}"
|
7
|
+
}
|
8
|
+
end
|
2
9
|
|
3
|
-
|
10
|
+
def self.endpoint
|
11
|
+
PropayClient.configuration.endpoint
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.get(path, headers: headers())
|
15
|
+
response = Excon.get("#{endpoint()}#{path}", headers: headers)
|
16
|
+
return JSON.parse(response.body) if response.status == 200
|
17
|
+
return JSON.parse(response.body) if response.status == 409
|
18
|
+
response.body
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.put(path, body: {}, headers: headers())
|
22
|
+
response = Excon.put("#{endpoint()}#{path}", body: body.to_json, headers: headers)
|
23
|
+
return JSON.parse(response.body) if response.status == 200
|
24
|
+
return JSON.parse(response.body) if response.status == 409
|
25
|
+
response.body
|
26
|
+
end
|
27
|
+
end
|
4
28
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module PropayClient
|
2
|
+
class Card < API
|
3
|
+
def self.create(account_number, params)
|
4
|
+
put("/propayapi/FlashFundsCard/#{account_number}", body: params)
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.update(account_number, params)
|
8
|
+
put("/propayapi/FlashFundsCard/#{account_number}", body: params)
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.push_funds_to_flash_funds_card(account_number, params)
|
12
|
+
put("/propayAPI/PushFundsToFlashFundsCard/#{account_number}", body: params)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module PropayClient
|
2
|
+
class Merchant < API
|
3
|
+
# build(:propay_account_request_data)
|
4
|
+
def self.create(params)
|
5
|
+
put("/propayapi/signup", body: params)
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.balance(account_number)
|
9
|
+
get("/propayAPI/MerchantBalanceDetails/#{account_number}")
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.edit_contact_info(account_number, params)
|
13
|
+
put("/propayAPI/MerchantContactInfo/#{account_number}", body: params)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.edit_address(account_number, params)
|
17
|
+
put("/propayAPI/MerchantAddress/#{account_number}", body: params)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.edit_renewal_payment_method(account_number, params)
|
21
|
+
put("/propayAPI/MerchantPaymentInformation/#{account_number}", body: params)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.edit_business_info(account_number, params)
|
25
|
+
put("/propayAPI/MerchantBusinessInfo/#{account_number}", body: params)
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.edit_bank_account(account_number, params)
|
29
|
+
put("/propayAPI/MerchantBankAccount/#{account_number}", body: params)
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.edit_gross_settle_payment_info(account_number, params)
|
33
|
+
put("/propayAPI/MerchantGrossSettleBilling/#{account_number}", body: params)
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.edit_services(account_number, params)
|
37
|
+
put("/propayAPI/MerchantServices/#{account_number}", body: params)
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.edit_status(account_number, params)
|
41
|
+
put("/propayAPI/MerchantStatus/#{account_number}", body: params)
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.edit_credit_limit(account_number, params)
|
45
|
+
put("/propayAPI/MerchantCreditLimit/#{account_number}", body: params)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: propay_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Rozenkin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: There is no another API gems, so I decided to create one
|
14
14
|
email:
|
@@ -28,12 +28,33 @@ files:
|
|
28
28
|
- Rakefile
|
29
29
|
- bin/console
|
30
30
|
- bin/setup
|
31
|
+
- fixtures/vcr_cassettes/account_renewal_success.yml
|
32
|
+
- fixtures/vcr_cassettes/card_creation_success.yml
|
31
33
|
- fixtures/vcr_cassettes/create_merchant_failure.yml
|
32
34
|
- fixtures/vcr_cassettes/create_merchant_success.yml
|
35
|
+
- fixtures/vcr_cassettes/document_upload_success.yml
|
36
|
+
- fixtures/vcr_cassettes/edit_merchant_address_success.yml
|
37
|
+
- fixtures/vcr_cassettes/edit_merchant_bank_account_success.yml
|
38
|
+
- fixtures/vcr_cassettes/edit_merchant_business_info_success.yml
|
39
|
+
- fixtures/vcr_cassettes/edit_merchant_contact_info_success.yml
|
40
|
+
- fixtures/vcr_cassettes/edit_merchant_credit_limit_success.yml
|
41
|
+
- fixtures/vcr_cassettes/edit_merchant_gross_settle_payment_info_success.yml
|
42
|
+
- fixtures/vcr_cassettes/edit_merchant_renewal_payment_method_success.yml
|
43
|
+
- fixtures/vcr_cassettes/edit_merchant_services_success.yml
|
44
|
+
- fixtures/vcr_cassettes/edit_merchant_status_success.yml
|
45
|
+
- fixtures/vcr_cassettes/merchant_balance_success.yml
|
46
|
+
- fixtures/vcr_cassettes/payment_propay_to_propay_success.yml
|
47
|
+
- fixtures/vcr_cassettes/payment_timed_pull_success.yml
|
48
|
+
- fixtures/vcr_cassettes/pushes_funds_to_flash_funds_card_success.yml
|
33
49
|
- lib/propay_client.rb
|
34
50
|
- lib/propay_client/api.rb
|
35
|
-
- lib/propay_client/api/merchant.rb
|
36
51
|
- lib/propay_client/configuration.rb
|
52
|
+
- lib/propay_client/resources.rb
|
53
|
+
- lib/propay_client/resources/account.rb
|
54
|
+
- lib/propay_client/resources/card.rb
|
55
|
+
- lib/propay_client/resources/document.rb
|
56
|
+
- lib/propay_client/resources/merchant.rb
|
57
|
+
- lib/propay_client/resources/payment.rb
|
37
58
|
- lib/propay_client/version.rb
|
38
59
|
- propay_client.gemspec
|
39
60
|
homepage: https://github.com/nikneroz/propay_client
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module PropayClient::API
|
2
|
-
class Merchant
|
3
|
-
# build(:propay_account_request_data)
|
4
|
-
def self.create(params)
|
5
|
-
headers = {
|
6
|
-
'Content-Type'=> 'application/json',
|
7
|
-
'Authorization' => "Basic #{PropayClient.configuration.api_key}"
|
8
|
-
}
|
9
|
-
response = Excon.put("#{PropayClient.configuration.endpoint}/propayapi/signup", body: params.to_json, headers: headers)
|
10
|
-
return JSON.parse(response.body) if response.status == 200
|
11
|
-
response.body
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|