fat_zebra 3.2.4 → 3.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fat_zebra/payment_plan.rb +0 -2
- data/lib/fat_zebra/version.rb +1 -1
- data/spec/cassettes/FatZebra_PaymentPlan/_create/perpetual_subscription/1_1_4_1.yml +183 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_create/perpetual_subscription/1_1_4_2.yml +183 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_create/perpetual_subscription/1_1_4_3.yml +183 -0
- data/spec/lib/fat_zebra/payment_plan_spec.rb +33 -10
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 606ea77a4be37bc7df3d2556a643e485601bb92f20dbf8612a6b20b6fe59c8d5
|
4
|
+
data.tar.gz: 0c1619ccf3607d9ea471db5ede1847e04f681e58dea61225caacc811cce98fad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a56d0f166c623875bc0781e9e958511e938bb1ac8076624644e5a21012a0349a9ce4d8b6c4e5cb4aa7381949fe194825c547089471b7e89a99a4dafadd373b9e
|
7
|
+
data.tar.gz: 4b44b153c380d149683b64c713b28a32caa49c064383efcfaf4d01c8319bdf2b30ad97872054d7b6e65f29421088311fddb57cd6d527120384f9a15c85ee27ee
|
@@ -24,8 +24,6 @@ module FatZebra
|
|
24
24
|
validates :start_date, required: true, on: :create
|
25
25
|
validates :frequency, required: true, on: :create
|
26
26
|
validates :anniversary, required: true, on: :create
|
27
|
-
validates :total_count, required: true, on: :create
|
28
|
-
validates :total_amount, required: true, on: :create
|
29
27
|
|
30
28
|
##
|
31
29
|
# Suspend a payment plan
|
data/lib/fat_zebra/version.rb
CHANGED
@@ -0,0 +1,183 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/customers
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"first_name":"Harrold","last_name":"Humphries","reference":"79cb17c5d392fb158d2c18d67f145e7d","email":"hhump@test.com","ip_address":"180.200.33.181","card":{"card_holder":"Harrold
|
9
|
+
Humphries Senior","card_number":"5123456789012346","expiry_date":"05/2023","cvv":"123"},"address":{"address":"1
|
10
|
+
Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"test":true}'
|
11
|
+
headers:
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
Authorization:
|
19
|
+
- Basic VEVTVDpURVNU
|
20
|
+
Content-Type:
|
21
|
+
- application/json
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Date:
|
28
|
+
- Thu, 06 Oct 2022 00:22:23 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Cache-Control:
|
38
|
+
- no-store
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=31536000; includeSubDomains
|
41
|
+
- max-age=31536000; includeSubDomains
|
42
|
+
X-Request-Version:
|
43
|
+
- 1.21.8
|
44
|
+
Pragma:
|
45
|
+
- no-cache
|
46
|
+
X-Request-Id:
|
47
|
+
- 681b03c82ea8480650d26190
|
48
|
+
X-Runtime:
|
49
|
+
- '0.083641'
|
50
|
+
X-Backend:
|
51
|
+
- gateway
|
52
|
+
Content-Security-Policy-Report-Only:
|
53
|
+
- 'child-src ''self'' blob: *.cardinalcommerce.com fatzebra.statuspage.io; connect-src
|
54
|
+
''self'' *.forter.com *.pmnts-staging.io *.rollbar.com *.nr-data.net *.cardinalcommerce.com
|
55
|
+
fatzebra.statuspage.io *.googleapis.com *.google-analytics.com; default-src
|
56
|
+
''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com *.nr-data.net blob:
|
57
|
+
*.pmnts-sandbox.io *.rollbar.com fatzebra.statuspage.io *.iovation.com data:
|
58
|
+
*.googleapis.com *.gstatic.com *.newrelic.com *.bootstrapcdn.com www.google.com
|
59
|
+
pay.google.com *.google-analytics.com *.gravatar.com; font-src ''self'' cdnjs.cloudflare.com
|
60
|
+
data: *.gstatic.com *.bootstrapcdn.com *.aexp-static.com; form-action ''self''
|
61
|
+
*.cardinalcommerce.com; frame-ancestors ''self''; frame-src ''self'' fatzebra.statuspage.io
|
62
|
+
*.americanexpress.com www.google.com pay.google.com *.masterpass.com *.visa.com
|
63
|
+
*.mastercard.com; img-src ''self'' *.visa.com data: *.googleapis.com *.gstatic.com
|
64
|
+
masterpass.com *.masterpass.com *.americanexpress.com *.google-analytics.com
|
65
|
+
*.gravatar.com; script-src ''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com
|
66
|
+
*.nr-data.net *.pmnts-sandbox.io *.pmnts-staging.io *.rollbar.com fatzebra.statuspage.io
|
67
|
+
cdnjs.cloudflare.com *.iovation.com *.jquery.com *.newrelic.com *.googleapis.com
|
68
|
+
*.cardinalcommerce.com *.bootstrapcdn.com wasm-eval *.google-analytics.com
|
69
|
+
*.googletagmanager.com; script-src-attr ''unsafe-inline''; script-src-elem
|
70
|
+
''self'' ''unsafe-inline'' *.forter.com *.nr-data.net *.pmnts-sandbox.io *.rollbar.com
|
71
|
+
fatzebra.statuspage.io *.iovation.com *.jquery.com cdnjs.cloudflare.com *.pmnts-staging.io
|
72
|
+
*.aexp-static.com *.newrelic.com *.googleapis.com *.americanexpress.com www.google.com
|
73
|
+
pay.google.com *.visa.com *.masterpass.com *.mastercard.com *.google-analytics.com
|
74
|
+
*.gstatic.com *.bootstrapcdn.com; style-src ''self'' ''unsafe-eval'' ''unsafe-inline''
|
75
|
+
*.bootstrapcdn.com *.googleapis.com; style-src-attr ''unsafe-inline''; style-src-elem
|
76
|
+
''unsafe-inline'' ''self'' *.googleapis.com cdnjs.cloudflare.com *.bootstrapcdn.com;
|
77
|
+
worker-src blob:; report-uri https://fatzebra.report-uri.com/r/d/csp/wizard'
|
78
|
+
Nel:
|
79
|
+
- '{"report_to":"default","max_age":31536000,"include_subdomains":true}'
|
80
|
+
Report-To:
|
81
|
+
- '{"group":"default","max_age":31536000,"endpoints":[{"url":"https://fatzebra.report-uri.com/a/d/g"}],"include_subdomains":true}'
|
82
|
+
body:
|
83
|
+
encoding: UTF-8
|
84
|
+
string: '{"successful":true,"response":{"id":"071-C-SHT1JCDR","email":"hhump@test.com","reference":"79cb17c5d392fb158d2c18d67f145e7d","first_name":"Harrold","last_name":"Humphries","created_at":"2022-10-06T11:22:23+11:00","address":{"address":"1
|
85
|
+
Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"card_token":"8hxhptfdjg8uhosaj59z","card_number":"512345XXXXXX2346","bank_account":null,"metadata":null,"sdk_ready":true},"errors":[],"test":true}'
|
86
|
+
http_version:
|
87
|
+
recorded_at: Thu, 06 Oct 2022 00:22:22 GMT
|
88
|
+
- request:
|
89
|
+
method: post
|
90
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '{"payment_method":"Credit Card","customer":"071-C-SHT1JCDR","reference":"e5a99a35e877b2b226611c73f141e208","setup_fee":0,"amount":100,"start_date":"2023-01-04","end_date":"2023-04-04","frequency":"Weekly","anniversary":5,"test":true}'
|
94
|
+
headers:
|
95
|
+
Accept-Encoding:
|
96
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
97
|
+
Accept:
|
98
|
+
- application/json
|
99
|
+
User-Agent:
|
100
|
+
- Ruby
|
101
|
+
Authorization:
|
102
|
+
- Basic VEVTVDpURVNU
|
103
|
+
Content-Type:
|
104
|
+
- application/json
|
105
|
+
response:
|
106
|
+
status:
|
107
|
+
code: 201
|
108
|
+
message: Created
|
109
|
+
headers:
|
110
|
+
Date:
|
111
|
+
- Thu, 06 Oct 2022 00:22:23 GMT
|
112
|
+
Content-Type:
|
113
|
+
- application/json; charset=utf-8
|
114
|
+
Transfer-Encoding:
|
115
|
+
- chunked
|
116
|
+
Connection:
|
117
|
+
- keep-alive
|
118
|
+
Status:
|
119
|
+
- 201 Created
|
120
|
+
Cache-Control:
|
121
|
+
- no-store
|
122
|
+
Strict-Transport-Security:
|
123
|
+
- max-age=31536000; includeSubDomains
|
124
|
+
- max-age=31536000; includeSubDomains
|
125
|
+
X-Request-Version:
|
126
|
+
- 1.21.8
|
127
|
+
Pragma:
|
128
|
+
- no-cache
|
129
|
+
X-Request-Id:
|
130
|
+
- 4f6c836430ba9f3b61966fd4
|
131
|
+
X-Runtime:
|
132
|
+
- '0.405789'
|
133
|
+
X-Backend:
|
134
|
+
- gateway
|
135
|
+
Content-Security-Policy-Report-Only:
|
136
|
+
- 'child-src ''self'' blob: *.cardinalcommerce.com fatzebra.statuspage.io; connect-src
|
137
|
+
''self'' *.forter.com *.pmnts-staging.io *.rollbar.com *.nr-data.net *.cardinalcommerce.com
|
138
|
+
fatzebra.statuspage.io *.googleapis.com *.google-analytics.com; default-src
|
139
|
+
''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com *.nr-data.net blob:
|
140
|
+
*.pmnts-sandbox.io *.rollbar.com fatzebra.statuspage.io *.iovation.com data:
|
141
|
+
*.googleapis.com *.gstatic.com *.newrelic.com *.bootstrapcdn.com www.google.com
|
142
|
+
pay.google.com *.google-analytics.com *.gravatar.com; font-src ''self'' cdnjs.cloudflare.com
|
143
|
+
data: *.gstatic.com *.bootstrapcdn.com *.aexp-static.com; form-action ''self''
|
144
|
+
*.cardinalcommerce.com; frame-ancestors ''self''; frame-src ''self'' fatzebra.statuspage.io
|
145
|
+
*.americanexpress.com www.google.com pay.google.com *.masterpass.com *.visa.com
|
146
|
+
*.mastercard.com; img-src ''self'' *.visa.com data: *.googleapis.com *.gstatic.com
|
147
|
+
masterpass.com *.masterpass.com *.americanexpress.com *.google-analytics.com
|
148
|
+
*.gravatar.com; script-src ''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com
|
149
|
+
*.nr-data.net *.pmnts-sandbox.io *.pmnts-staging.io *.rollbar.com fatzebra.statuspage.io
|
150
|
+
cdnjs.cloudflare.com *.iovation.com *.jquery.com *.newrelic.com *.googleapis.com
|
151
|
+
*.cardinalcommerce.com *.bootstrapcdn.com wasm-eval *.google-analytics.com
|
152
|
+
*.googletagmanager.com; script-src-attr ''unsafe-inline''; script-src-elem
|
153
|
+
''self'' ''unsafe-inline'' *.forter.com *.nr-data.net *.pmnts-sandbox.io *.rollbar.com
|
154
|
+
fatzebra.statuspage.io *.iovation.com *.jquery.com cdnjs.cloudflare.com *.pmnts-staging.io
|
155
|
+
*.aexp-static.com *.newrelic.com *.googleapis.com *.americanexpress.com www.google.com
|
156
|
+
pay.google.com *.visa.com *.masterpass.com *.mastercard.com *.google-analytics.com
|
157
|
+
*.gstatic.com *.bootstrapcdn.com; style-src ''self'' ''unsafe-eval'' ''unsafe-inline''
|
158
|
+
*.bootstrapcdn.com *.googleapis.com; style-src-attr ''unsafe-inline''; style-src-elem
|
159
|
+
''unsafe-inline'' ''self'' *.googleapis.com cdnjs.cloudflare.com *.bootstrapcdn.com;
|
160
|
+
worker-src blob:; report-uri https://fatzebra.report-uri.com/r/d/csp/wizard'
|
161
|
+
Nel:
|
162
|
+
- '{"report_to":"default","max_age":31536000,"include_subdomains":true}'
|
163
|
+
Report-To:
|
164
|
+
- '{"group":"default","max_age":31536000,"endpoints":[{"url":"https://fatzebra.report-uri.com/a/d/g"}],"include_subdomains":true}'
|
165
|
+
body:
|
166
|
+
encoding: UTF-8
|
167
|
+
string: '{"successful":true,"response":{"id":"071-PP-RN9CEUJC","customer":"071-C-SHT1JCDR","amount":100,"currency":"AUD","setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2023-01-04","end_date":"2023-04-04","total_count":null,"total_amount":null,"payment_method":"Credit
|
168
|
+
Card","reference":"e5a99a35e877b2b226611c73f141e208","description":null,"status":"Active","status_reason":"None","created_at":"2022-10-06T11:22:23+11:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[{"id":"071-PT-PXO3HBWY","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0001","amount":100,"currency":"AUD","scheduled_date":"2023-01-06","payment_method":"Credit
|
169
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-7V9AUT9X","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0002","amount":100,"currency":"AUD","scheduled_date":"2023-01-13","payment_method":"Credit
|
170
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-8HKSQKH8","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0003","amount":100,"currency":"AUD","scheduled_date":"2023-01-20","payment_method":"Credit
|
171
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-Q672MW0R","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0004","amount":100,"currency":"AUD","scheduled_date":"2023-01-27","payment_method":"Credit
|
172
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-VV8EWW99","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0005","amount":100,"currency":"AUD","scheduled_date":"2023-02-03","payment_method":"Credit
|
173
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-WWENJPEN","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0006","amount":100,"currency":"AUD","scheduled_date":"2023-02-10","payment_method":"Credit
|
174
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-3Z36PCC1","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0007","amount":100,"currency":"AUD","scheduled_date":"2023-02-17","payment_method":"Credit
|
175
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-P8P0RMGA","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0008","amount":100,"currency":"AUD","scheduled_date":"2023-02-24","payment_method":"Credit
|
176
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-MNWP7YHJ","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0009","amount":100,"currency":"AUD","scheduled_date":"2023-03-03","payment_method":"Credit
|
177
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-1SRRLVF9","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0010","amount":100,"currency":"AUD","scheduled_date":"2023-03-10","payment_method":"Credit
|
178
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-YEPJPBC8","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0011","amount":100,"currency":"AUD","scheduled_date":"2023-03-17","payment_method":"Credit
|
179
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-H3UMOW5F","payment_plan":"071-PP-RN9CEUJC","reference":"e5a99a35e877b2b226611c73f141e208-0012","amount":100,"currency":"AUD","scheduled_date":"2023-03-24","payment_method":"Credit
|
180
|
+
Card","status":"Scheduled","result":null,"records":[]}]},"errors":[],"test":true}'
|
181
|
+
http_version:
|
182
|
+
recorded_at: Thu, 06 Oct 2022 00:22:23 GMT
|
183
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,183 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/customers
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"first_name":"Harrold","last_name":"Humphries","reference":"335a5085e1c87f78bdd6846abce50d1e","email":"hhump@test.com","ip_address":"180.200.33.181","card":{"card_holder":"Harrold
|
9
|
+
Humphries Senior","card_number":"5123456789012346","expiry_date":"05/2023","cvv":"123"},"address":{"address":"1
|
10
|
+
Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"test":true}'
|
11
|
+
headers:
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
Authorization:
|
19
|
+
- Basic VEVTVDpURVNU
|
20
|
+
Content-Type:
|
21
|
+
- application/json
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Date:
|
28
|
+
- Thu, 06 Oct 2022 00:22:24 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Cache-Control:
|
38
|
+
- no-store
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=31536000; includeSubDomains
|
41
|
+
- max-age=31536000; includeSubDomains
|
42
|
+
X-Request-Version:
|
43
|
+
- 1.21.8
|
44
|
+
Pragma:
|
45
|
+
- no-cache
|
46
|
+
X-Request-Id:
|
47
|
+
- 4fa7935a4d107f79560228e5
|
48
|
+
X-Runtime:
|
49
|
+
- '0.098838'
|
50
|
+
X-Backend:
|
51
|
+
- gateway
|
52
|
+
Content-Security-Policy-Report-Only:
|
53
|
+
- 'child-src ''self'' blob: *.cardinalcommerce.com fatzebra.statuspage.io; connect-src
|
54
|
+
''self'' *.forter.com *.pmnts-staging.io *.rollbar.com *.nr-data.net *.cardinalcommerce.com
|
55
|
+
fatzebra.statuspage.io *.googleapis.com *.google-analytics.com; default-src
|
56
|
+
''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com *.nr-data.net blob:
|
57
|
+
*.pmnts-sandbox.io *.rollbar.com fatzebra.statuspage.io *.iovation.com data:
|
58
|
+
*.googleapis.com *.gstatic.com *.newrelic.com *.bootstrapcdn.com www.google.com
|
59
|
+
pay.google.com *.google-analytics.com *.gravatar.com; font-src ''self'' cdnjs.cloudflare.com
|
60
|
+
data: *.gstatic.com *.bootstrapcdn.com *.aexp-static.com; form-action ''self''
|
61
|
+
*.cardinalcommerce.com; frame-ancestors ''self''; frame-src ''self'' fatzebra.statuspage.io
|
62
|
+
*.americanexpress.com www.google.com pay.google.com *.masterpass.com *.visa.com
|
63
|
+
*.mastercard.com; img-src ''self'' *.visa.com data: *.googleapis.com *.gstatic.com
|
64
|
+
masterpass.com *.masterpass.com *.americanexpress.com *.google-analytics.com
|
65
|
+
*.gravatar.com; script-src ''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com
|
66
|
+
*.nr-data.net *.pmnts-sandbox.io *.pmnts-staging.io *.rollbar.com fatzebra.statuspage.io
|
67
|
+
cdnjs.cloudflare.com *.iovation.com *.jquery.com *.newrelic.com *.googleapis.com
|
68
|
+
*.cardinalcommerce.com *.bootstrapcdn.com wasm-eval *.google-analytics.com
|
69
|
+
*.googletagmanager.com; script-src-attr ''unsafe-inline''; script-src-elem
|
70
|
+
''self'' ''unsafe-inline'' *.forter.com *.nr-data.net *.pmnts-sandbox.io *.rollbar.com
|
71
|
+
fatzebra.statuspage.io *.iovation.com *.jquery.com cdnjs.cloudflare.com *.pmnts-staging.io
|
72
|
+
*.aexp-static.com *.newrelic.com *.googleapis.com *.americanexpress.com www.google.com
|
73
|
+
pay.google.com *.visa.com *.masterpass.com *.mastercard.com *.google-analytics.com
|
74
|
+
*.gstatic.com *.bootstrapcdn.com; style-src ''self'' ''unsafe-eval'' ''unsafe-inline''
|
75
|
+
*.bootstrapcdn.com *.googleapis.com; style-src-attr ''unsafe-inline''; style-src-elem
|
76
|
+
''unsafe-inline'' ''self'' *.googleapis.com cdnjs.cloudflare.com *.bootstrapcdn.com;
|
77
|
+
worker-src blob:; report-uri https://fatzebra.report-uri.com/r/d/csp/wizard'
|
78
|
+
Nel:
|
79
|
+
- '{"report_to":"default","max_age":31536000,"include_subdomains":true}'
|
80
|
+
Report-To:
|
81
|
+
- '{"group":"default","max_age":31536000,"endpoints":[{"url":"https://fatzebra.report-uri.com/a/d/g"}],"include_subdomains":true}'
|
82
|
+
body:
|
83
|
+
encoding: UTF-8
|
84
|
+
string: '{"successful":true,"response":{"id":"071-C-Y1AC3F01","email":"hhump@test.com","reference":"335a5085e1c87f78bdd6846abce50d1e","first_name":"Harrold","last_name":"Humphries","created_at":"2022-10-06T11:22:24+11:00","address":{"address":"1
|
85
|
+
Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"card_token":"8q2nus7yhqbdbm1je84d","card_number":"512345XXXXXX2346","bank_account":null,"metadata":null,"sdk_ready":true},"errors":[],"test":true}'
|
86
|
+
http_version:
|
87
|
+
recorded_at: Thu, 06 Oct 2022 00:22:24 GMT
|
88
|
+
- request:
|
89
|
+
method: post
|
90
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '{"payment_method":"Credit Card","customer":"071-C-Y1AC3F01","reference":"8d2050ed6911b6ab9ce57280ada606ff","setup_fee":0,"amount":100,"start_date":"2023-01-04","end_date":"2023-04-04","frequency":"Weekly","anniversary":5,"test":true}'
|
94
|
+
headers:
|
95
|
+
Accept-Encoding:
|
96
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
97
|
+
Accept:
|
98
|
+
- application/json
|
99
|
+
User-Agent:
|
100
|
+
- Ruby
|
101
|
+
Authorization:
|
102
|
+
- Basic VEVTVDpURVNU
|
103
|
+
Content-Type:
|
104
|
+
- application/json
|
105
|
+
response:
|
106
|
+
status:
|
107
|
+
code: 201
|
108
|
+
message: Created
|
109
|
+
headers:
|
110
|
+
Date:
|
111
|
+
- Thu, 06 Oct 2022 00:22:25 GMT
|
112
|
+
Content-Type:
|
113
|
+
- application/json; charset=utf-8
|
114
|
+
Transfer-Encoding:
|
115
|
+
- chunked
|
116
|
+
Connection:
|
117
|
+
- keep-alive
|
118
|
+
Status:
|
119
|
+
- 201 Created
|
120
|
+
Cache-Control:
|
121
|
+
- no-store
|
122
|
+
Strict-Transport-Security:
|
123
|
+
- max-age=31536000; includeSubDomains
|
124
|
+
- max-age=31536000; includeSubDomains
|
125
|
+
X-Request-Version:
|
126
|
+
- 1.21.8
|
127
|
+
Pragma:
|
128
|
+
- no-cache
|
129
|
+
X-Request-Id:
|
130
|
+
- 593d6cdb23db9ece36f91faf
|
131
|
+
X-Runtime:
|
132
|
+
- '0.431061'
|
133
|
+
X-Backend:
|
134
|
+
- gateway
|
135
|
+
Content-Security-Policy-Report-Only:
|
136
|
+
- 'child-src ''self'' blob: *.cardinalcommerce.com fatzebra.statuspage.io; connect-src
|
137
|
+
''self'' *.forter.com *.pmnts-staging.io *.rollbar.com *.nr-data.net *.cardinalcommerce.com
|
138
|
+
fatzebra.statuspage.io *.googleapis.com *.google-analytics.com; default-src
|
139
|
+
''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com *.nr-data.net blob:
|
140
|
+
*.pmnts-sandbox.io *.rollbar.com fatzebra.statuspage.io *.iovation.com data:
|
141
|
+
*.googleapis.com *.gstatic.com *.newrelic.com *.bootstrapcdn.com www.google.com
|
142
|
+
pay.google.com *.google-analytics.com *.gravatar.com; font-src ''self'' cdnjs.cloudflare.com
|
143
|
+
data: *.gstatic.com *.bootstrapcdn.com *.aexp-static.com; form-action ''self''
|
144
|
+
*.cardinalcommerce.com; frame-ancestors ''self''; frame-src ''self'' fatzebra.statuspage.io
|
145
|
+
*.americanexpress.com www.google.com pay.google.com *.masterpass.com *.visa.com
|
146
|
+
*.mastercard.com; img-src ''self'' *.visa.com data: *.googleapis.com *.gstatic.com
|
147
|
+
masterpass.com *.masterpass.com *.americanexpress.com *.google-analytics.com
|
148
|
+
*.gravatar.com; script-src ''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com
|
149
|
+
*.nr-data.net *.pmnts-sandbox.io *.pmnts-staging.io *.rollbar.com fatzebra.statuspage.io
|
150
|
+
cdnjs.cloudflare.com *.iovation.com *.jquery.com *.newrelic.com *.googleapis.com
|
151
|
+
*.cardinalcommerce.com *.bootstrapcdn.com wasm-eval *.google-analytics.com
|
152
|
+
*.googletagmanager.com; script-src-attr ''unsafe-inline''; script-src-elem
|
153
|
+
''self'' ''unsafe-inline'' *.forter.com *.nr-data.net *.pmnts-sandbox.io *.rollbar.com
|
154
|
+
fatzebra.statuspage.io *.iovation.com *.jquery.com cdnjs.cloudflare.com *.pmnts-staging.io
|
155
|
+
*.aexp-static.com *.newrelic.com *.googleapis.com *.americanexpress.com www.google.com
|
156
|
+
pay.google.com *.visa.com *.masterpass.com *.mastercard.com *.google-analytics.com
|
157
|
+
*.gstatic.com *.bootstrapcdn.com; style-src ''self'' ''unsafe-eval'' ''unsafe-inline''
|
158
|
+
*.bootstrapcdn.com *.googleapis.com; style-src-attr ''unsafe-inline''; style-src-elem
|
159
|
+
''unsafe-inline'' ''self'' *.googleapis.com cdnjs.cloudflare.com *.bootstrapcdn.com;
|
160
|
+
worker-src blob:; report-uri https://fatzebra.report-uri.com/r/d/csp/wizard'
|
161
|
+
Nel:
|
162
|
+
- '{"report_to":"default","max_age":31536000,"include_subdomains":true}'
|
163
|
+
Report-To:
|
164
|
+
- '{"group":"default","max_age":31536000,"endpoints":[{"url":"https://fatzebra.report-uri.com/a/d/g"}],"include_subdomains":true}'
|
165
|
+
body:
|
166
|
+
encoding: UTF-8
|
167
|
+
string: '{"successful":true,"response":{"id":"071-PP-VS3BW7PP","customer":"071-C-Y1AC3F01","amount":100,"currency":"AUD","setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2023-01-04","end_date":"2023-04-04","total_count":null,"total_amount":null,"payment_method":"Credit
|
168
|
+
Card","reference":"8d2050ed6911b6ab9ce57280ada606ff","description":null,"status":"Active","status_reason":"None","created_at":"2022-10-06T11:22:25+11:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[{"id":"071-PT-5GZKIR2P","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0001","amount":100,"currency":"AUD","scheduled_date":"2023-01-06","payment_method":"Credit
|
169
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-6GZSJM80","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0002","amount":100,"currency":"AUD","scheduled_date":"2023-01-13","payment_method":"Credit
|
170
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-RGMB252W","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0003","amount":100,"currency":"AUD","scheduled_date":"2023-01-20","payment_method":"Credit
|
171
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-SIRYWHXB","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0004","amount":100,"currency":"AUD","scheduled_date":"2023-01-27","payment_method":"Credit
|
172
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-TJERCOP7","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0005","amount":100,"currency":"AUD","scheduled_date":"2023-02-03","payment_method":"Credit
|
173
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-FU8IXW7U","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0006","amount":100,"currency":"AUD","scheduled_date":"2023-02-10","payment_method":"Credit
|
174
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-IEIMCX2Y","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0007","amount":100,"currency":"AUD","scheduled_date":"2023-02-17","payment_method":"Credit
|
175
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-M80CWO1A","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0008","amount":100,"currency":"AUD","scheduled_date":"2023-02-24","payment_method":"Credit
|
176
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-VBRJQY4O","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0009","amount":100,"currency":"AUD","scheduled_date":"2023-03-03","payment_method":"Credit
|
177
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-D7TRN8GI","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0010","amount":100,"currency":"AUD","scheduled_date":"2023-03-10","payment_method":"Credit
|
178
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-RSLAC0E0","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0011","amount":100,"currency":"AUD","scheduled_date":"2023-03-17","payment_method":"Credit
|
179
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-S2NUKBXL","payment_plan":"071-PP-VS3BW7PP","reference":"8d2050ed6911b6ab9ce57280ada606ff-0012","amount":100,"currency":"AUD","scheduled_date":"2023-03-24","payment_method":"Credit
|
180
|
+
Card","status":"Scheduled","result":null,"records":[]}]},"errors":[],"test":true}'
|
181
|
+
http_version:
|
182
|
+
recorded_at: Thu, 06 Oct 2022 00:22:25 GMT
|
183
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,183 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/customers
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"first_name":"Harrold","last_name":"Humphries","reference":"24afa31905723b983269b560ea69305b","email":"hhump@test.com","ip_address":"180.200.33.181","card":{"card_holder":"Harrold
|
9
|
+
Humphries Senior","card_number":"5123456789012346","expiry_date":"05/2023","cvv":"123"},"address":{"address":"1
|
10
|
+
Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"test":true}'
|
11
|
+
headers:
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
Authorization:
|
19
|
+
- Basic VEVTVDpURVNU
|
20
|
+
Content-Type:
|
21
|
+
- application/json
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Date:
|
28
|
+
- Thu, 06 Oct 2022 00:22:26 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Cache-Control:
|
38
|
+
- no-store
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=31536000; includeSubDomains
|
41
|
+
- max-age=31536000; includeSubDomains
|
42
|
+
X-Request-Version:
|
43
|
+
- 1.21.8
|
44
|
+
Pragma:
|
45
|
+
- no-cache
|
46
|
+
X-Request-Id:
|
47
|
+
- 719015d575211a060e5bb57e
|
48
|
+
X-Runtime:
|
49
|
+
- '0.080575'
|
50
|
+
X-Backend:
|
51
|
+
- gateway
|
52
|
+
Content-Security-Policy-Report-Only:
|
53
|
+
- 'child-src ''self'' blob: *.cardinalcommerce.com fatzebra.statuspage.io; connect-src
|
54
|
+
''self'' *.forter.com *.pmnts-staging.io *.rollbar.com *.nr-data.net *.cardinalcommerce.com
|
55
|
+
fatzebra.statuspage.io *.googleapis.com *.google-analytics.com; default-src
|
56
|
+
''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com *.nr-data.net blob:
|
57
|
+
*.pmnts-sandbox.io *.rollbar.com fatzebra.statuspage.io *.iovation.com data:
|
58
|
+
*.googleapis.com *.gstatic.com *.newrelic.com *.bootstrapcdn.com www.google.com
|
59
|
+
pay.google.com *.google-analytics.com *.gravatar.com; font-src ''self'' cdnjs.cloudflare.com
|
60
|
+
data: *.gstatic.com *.bootstrapcdn.com *.aexp-static.com; form-action ''self''
|
61
|
+
*.cardinalcommerce.com; frame-ancestors ''self''; frame-src ''self'' fatzebra.statuspage.io
|
62
|
+
*.americanexpress.com www.google.com pay.google.com *.masterpass.com *.visa.com
|
63
|
+
*.mastercard.com; img-src ''self'' *.visa.com data: *.googleapis.com *.gstatic.com
|
64
|
+
masterpass.com *.masterpass.com *.americanexpress.com *.google-analytics.com
|
65
|
+
*.gravatar.com; script-src ''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com
|
66
|
+
*.nr-data.net *.pmnts-sandbox.io *.pmnts-staging.io *.rollbar.com fatzebra.statuspage.io
|
67
|
+
cdnjs.cloudflare.com *.iovation.com *.jquery.com *.newrelic.com *.googleapis.com
|
68
|
+
*.cardinalcommerce.com *.bootstrapcdn.com wasm-eval *.google-analytics.com
|
69
|
+
*.googletagmanager.com; script-src-attr ''unsafe-inline''; script-src-elem
|
70
|
+
''self'' ''unsafe-inline'' *.forter.com *.nr-data.net *.pmnts-sandbox.io *.rollbar.com
|
71
|
+
fatzebra.statuspage.io *.iovation.com *.jquery.com cdnjs.cloudflare.com *.pmnts-staging.io
|
72
|
+
*.aexp-static.com *.newrelic.com *.googleapis.com *.americanexpress.com www.google.com
|
73
|
+
pay.google.com *.visa.com *.masterpass.com *.mastercard.com *.google-analytics.com
|
74
|
+
*.gstatic.com *.bootstrapcdn.com; style-src ''self'' ''unsafe-eval'' ''unsafe-inline''
|
75
|
+
*.bootstrapcdn.com *.googleapis.com; style-src-attr ''unsafe-inline''; style-src-elem
|
76
|
+
''unsafe-inline'' ''self'' *.googleapis.com cdnjs.cloudflare.com *.bootstrapcdn.com;
|
77
|
+
worker-src blob:; report-uri https://fatzebra.report-uri.com/r/d/csp/wizard'
|
78
|
+
Nel:
|
79
|
+
- '{"report_to":"default","max_age":31536000,"include_subdomains":true}'
|
80
|
+
Report-To:
|
81
|
+
- '{"group":"default","max_age":31536000,"endpoints":[{"url":"https://fatzebra.report-uri.com/a/d/g"}],"include_subdomains":true}'
|
82
|
+
body:
|
83
|
+
encoding: UTF-8
|
84
|
+
string: '{"successful":true,"response":{"id":"071-C-6FMTKA57","email":"hhump@test.com","reference":"24afa31905723b983269b560ea69305b","first_name":"Harrold","last_name":"Humphries","created_at":"2022-10-06T11:22:25+11:00","address":{"address":"1
|
85
|
+
Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"card_token":"oqh8v4jtgsl8ckdka9s1","card_number":"512345XXXXXX2346","bank_account":null,"metadata":null,"sdk_ready":true},"errors":[],"test":true}'
|
86
|
+
http_version:
|
87
|
+
recorded_at: Thu, 06 Oct 2022 00:22:25 GMT
|
88
|
+
- request:
|
89
|
+
method: post
|
90
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '{"payment_method":"Credit Card","customer":"071-C-6FMTKA57","reference":"7b6bc420610da917011cc24cfa35d98d","setup_fee":0,"amount":100,"start_date":"2023-01-04","end_date":"2023-04-04","frequency":"Weekly","anniversary":5,"test":true}'
|
94
|
+
headers:
|
95
|
+
Accept-Encoding:
|
96
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
97
|
+
Accept:
|
98
|
+
- application/json
|
99
|
+
User-Agent:
|
100
|
+
- Ruby
|
101
|
+
Authorization:
|
102
|
+
- Basic VEVTVDpURVNU
|
103
|
+
Content-Type:
|
104
|
+
- application/json
|
105
|
+
response:
|
106
|
+
status:
|
107
|
+
code: 201
|
108
|
+
message: Created
|
109
|
+
headers:
|
110
|
+
Date:
|
111
|
+
- Thu, 06 Oct 2022 00:22:26 GMT
|
112
|
+
Content-Type:
|
113
|
+
- application/json; charset=utf-8
|
114
|
+
Transfer-Encoding:
|
115
|
+
- chunked
|
116
|
+
Connection:
|
117
|
+
- keep-alive
|
118
|
+
Status:
|
119
|
+
- 201 Created
|
120
|
+
Cache-Control:
|
121
|
+
- no-store
|
122
|
+
Strict-Transport-Security:
|
123
|
+
- max-age=31536000; includeSubDomains
|
124
|
+
- max-age=31536000; includeSubDomains
|
125
|
+
X-Request-Version:
|
126
|
+
- 1.21.8
|
127
|
+
Pragma:
|
128
|
+
- no-cache
|
129
|
+
X-Request-Id:
|
130
|
+
- '09b341c47a3f603f10d825ab'
|
131
|
+
X-Runtime:
|
132
|
+
- '0.405580'
|
133
|
+
X-Backend:
|
134
|
+
- gateway
|
135
|
+
Content-Security-Policy-Report-Only:
|
136
|
+
- 'child-src ''self'' blob: *.cardinalcommerce.com fatzebra.statuspage.io; connect-src
|
137
|
+
''self'' *.forter.com *.pmnts-staging.io *.rollbar.com *.nr-data.net *.cardinalcommerce.com
|
138
|
+
fatzebra.statuspage.io *.googleapis.com *.google-analytics.com; default-src
|
139
|
+
''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com *.nr-data.net blob:
|
140
|
+
*.pmnts-sandbox.io *.rollbar.com fatzebra.statuspage.io *.iovation.com data:
|
141
|
+
*.googleapis.com *.gstatic.com *.newrelic.com *.bootstrapcdn.com www.google.com
|
142
|
+
pay.google.com *.google-analytics.com *.gravatar.com; font-src ''self'' cdnjs.cloudflare.com
|
143
|
+
data: *.gstatic.com *.bootstrapcdn.com *.aexp-static.com; form-action ''self''
|
144
|
+
*.cardinalcommerce.com; frame-ancestors ''self''; frame-src ''self'' fatzebra.statuspage.io
|
145
|
+
*.americanexpress.com www.google.com pay.google.com *.masterpass.com *.visa.com
|
146
|
+
*.mastercard.com; img-src ''self'' *.visa.com data: *.googleapis.com *.gstatic.com
|
147
|
+
masterpass.com *.masterpass.com *.americanexpress.com *.google-analytics.com
|
148
|
+
*.gravatar.com; script-src ''self'' ''unsafe-eval'' ''unsafe-inline'' *.forter.com
|
149
|
+
*.nr-data.net *.pmnts-sandbox.io *.pmnts-staging.io *.rollbar.com fatzebra.statuspage.io
|
150
|
+
cdnjs.cloudflare.com *.iovation.com *.jquery.com *.newrelic.com *.googleapis.com
|
151
|
+
*.cardinalcommerce.com *.bootstrapcdn.com wasm-eval *.google-analytics.com
|
152
|
+
*.googletagmanager.com; script-src-attr ''unsafe-inline''; script-src-elem
|
153
|
+
''self'' ''unsafe-inline'' *.forter.com *.nr-data.net *.pmnts-sandbox.io *.rollbar.com
|
154
|
+
fatzebra.statuspage.io *.iovation.com *.jquery.com cdnjs.cloudflare.com *.pmnts-staging.io
|
155
|
+
*.aexp-static.com *.newrelic.com *.googleapis.com *.americanexpress.com www.google.com
|
156
|
+
pay.google.com *.visa.com *.masterpass.com *.mastercard.com *.google-analytics.com
|
157
|
+
*.gstatic.com *.bootstrapcdn.com; style-src ''self'' ''unsafe-eval'' ''unsafe-inline''
|
158
|
+
*.bootstrapcdn.com *.googleapis.com; style-src-attr ''unsafe-inline''; style-src-elem
|
159
|
+
''unsafe-inline'' ''self'' *.googleapis.com cdnjs.cloudflare.com *.bootstrapcdn.com;
|
160
|
+
worker-src blob:; report-uri https://fatzebra.report-uri.com/r/d/csp/wizard'
|
161
|
+
Nel:
|
162
|
+
- '{"report_to":"default","max_age":31536000,"include_subdomains":true}'
|
163
|
+
Report-To:
|
164
|
+
- '{"group":"default","max_age":31536000,"endpoints":[{"url":"https://fatzebra.report-uri.com/a/d/g"}],"include_subdomains":true}'
|
165
|
+
body:
|
166
|
+
encoding: UTF-8
|
167
|
+
string: '{"successful":true,"response":{"id":"071-PP-CT2VS286","customer":"071-C-6FMTKA57","amount":100,"currency":"AUD","setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2023-01-04","end_date":"2023-04-04","total_count":null,"total_amount":null,"payment_method":"Credit
|
168
|
+
Card","reference":"7b6bc420610da917011cc24cfa35d98d","description":null,"status":"Active","status_reason":"None","created_at":"2022-10-06T11:22:26+11:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[{"id":"071-PT-GCDX05QC","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0001","amount":100,"currency":"AUD","scheduled_date":"2023-01-06","payment_method":"Credit
|
169
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-6LM6H00S","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0002","amount":100,"currency":"AUD","scheduled_date":"2023-01-13","payment_method":"Credit
|
170
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-EVK5KMZ2","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0003","amount":100,"currency":"AUD","scheduled_date":"2023-01-20","payment_method":"Credit
|
171
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-12SYJEVW","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0004","amount":100,"currency":"AUD","scheduled_date":"2023-01-27","payment_method":"Credit
|
172
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-BHKWQZGK","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0005","amount":100,"currency":"AUD","scheduled_date":"2023-02-03","payment_method":"Credit
|
173
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-G4TZJ5EE","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0006","amount":100,"currency":"AUD","scheduled_date":"2023-02-10","payment_method":"Credit
|
174
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-UWZSFWOR","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0007","amount":100,"currency":"AUD","scheduled_date":"2023-02-17","payment_method":"Credit
|
175
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-QVSEDRFY","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0008","amount":100,"currency":"AUD","scheduled_date":"2023-02-24","payment_method":"Credit
|
176
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-GQVAZOM7","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0009","amount":100,"currency":"AUD","scheduled_date":"2023-03-03","payment_method":"Credit
|
177
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-NFE7J1MV","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0010","amount":100,"currency":"AUD","scheduled_date":"2023-03-10","payment_method":"Credit
|
178
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-VS36TXC4","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0011","amount":100,"currency":"AUD","scheduled_date":"2023-03-17","payment_method":"Credit
|
179
|
+
Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-PTV0ORDF","payment_plan":"071-PP-CT2VS286","reference":"7b6bc420610da917011cc24cfa35d98d-0012","amount":100,"currency":"AUD","scheduled_date":"2023-03-24","payment_method":"Credit
|
180
|
+
Card","status":"Scheduled","result":null,"records":[]}]},"errors":[],"test":true}'
|
181
|
+
http_version:
|
182
|
+
recorded_at: Thu, 06 Oct 2022 00:22:26 GMT
|
183
|
+
recorded_with: VCR 3.0.3
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe FatZebra::PaymentPlan do
|
4
4
|
let(:customer) { FatZebra::Customer.create(customer_valid_payload) }
|
5
5
|
|
6
|
-
let(:
|
6
|
+
let(:valid_instalment_payload) {{
|
7
7
|
payment_method: 'Credit Card',
|
8
8
|
customer: customer.id,
|
9
9
|
reference: SecureRandom.hex,
|
@@ -16,22 +16,45 @@ describe FatZebra::PaymentPlan do
|
|
16
16
|
total_amount: 500
|
17
17
|
}}
|
18
18
|
|
19
|
+
let(:valid_subscription_payload) {{
|
20
|
+
payment_method: 'Credit Card',
|
21
|
+
customer: customer.id,
|
22
|
+
reference: SecureRandom.hex,
|
23
|
+
setup_fee: 0,
|
24
|
+
amount: 100,
|
25
|
+
start_date: (Date.today + 90).strftime('%Y-%m-%d'),
|
26
|
+
end_date: (Date.today + 180).strftime('%Y-%m-%d'),
|
27
|
+
frequency: 'Weekly',
|
28
|
+
anniversary: 5,
|
29
|
+
}}
|
30
|
+
|
31
|
+
|
19
32
|
describe '.create', :vcr do
|
20
|
-
subject(:payment_plan) { FatZebra::PaymentPlan.create(
|
33
|
+
subject(:payment_plan) { FatZebra::PaymentPlan.create(valid_instalment_payload) }
|
21
34
|
|
22
35
|
it { is_expected.to be_accepted }
|
23
36
|
it { expect(payment_plan.id).to_not be_empty }
|
24
37
|
it { expect(payment_plan.payments.count).to eq(5) }
|
25
38
|
|
39
|
+
context 'perpetual subscription' do
|
40
|
+
subject(:subscription_payload) { FatZebra::PaymentPlan.create(valid_subscription_payload) }
|
41
|
+
it { is_expected.to be_accepted }
|
42
|
+
it { expect(subscription_payload.id).to_not be_empty }
|
43
|
+
it { expect(subscription_payload.payments.count).to eq(12) }
|
44
|
+
end
|
45
|
+
|
26
46
|
context 'validations' do
|
27
|
-
let(:
|
47
|
+
let(:valid_instalment_payload) {{}}
|
28
48
|
|
29
49
|
it { expect { payment_plan }.to raise_error(FatZebra::RequestValidationError) }
|
50
|
+
|
30
51
|
end
|
52
|
+
|
53
|
+
|
31
54
|
end
|
32
55
|
|
33
56
|
describe '.find', :vcr do
|
34
|
-
let!(:create) { FatZebra::PaymentPlan.create(
|
57
|
+
let!(:create) { FatZebra::PaymentPlan.create(valid_instalment_payload) }
|
35
58
|
subject(:payment_plan) { FatZebra::PaymentPlan.find(create.reference) }
|
36
59
|
|
37
60
|
it { is_expected.to be_accepted }
|
@@ -40,7 +63,7 @@ describe FatZebra::PaymentPlan do
|
|
40
63
|
end
|
41
64
|
|
42
65
|
describe '.update', :vcr do
|
43
|
-
let(:create) { FatZebra::PaymentPlan.create(
|
66
|
+
let(:create) { FatZebra::PaymentPlan.create(valid_instalment_payload) }
|
44
67
|
|
45
68
|
subject(:payment_plan) { FatZebra::PaymentPlan.update(create.id, new_status: 'Suspended') }
|
46
69
|
|
@@ -50,7 +73,7 @@ describe FatZebra::PaymentPlan do
|
|
50
73
|
end
|
51
74
|
|
52
75
|
context '#update', :vcr do
|
53
|
-
let(:payment_plan) { FatZebra::PaymentPlan.new(
|
76
|
+
let(:payment_plan) { FatZebra::PaymentPlan.new(valid_instalment_payload) }
|
54
77
|
before { payment_plan.save }
|
55
78
|
before { payment_plan.update(new_status: 'Suspended') }
|
56
79
|
|
@@ -59,21 +82,21 @@ describe FatZebra::PaymentPlan do
|
|
59
82
|
end
|
60
83
|
|
61
84
|
describe '.delete', :vcr do
|
62
|
-
let(:create) { FatZebra::PaymentPlan.create(
|
85
|
+
let(:create) { FatZebra::PaymentPlan.create(valid_instalment_payload) }
|
63
86
|
subject(:payment_plan) { FatZebra::PaymentPlan.delete(create.id) }
|
64
87
|
|
65
88
|
it { is_expected.to be_accepted }
|
66
89
|
end
|
67
90
|
|
68
91
|
describe '#destroy', :vcr do
|
69
|
-
let(:payment_plan) { FatZebra::PaymentPlan.create(
|
92
|
+
let(:payment_plan) { FatZebra::PaymentPlan.create(valid_instalment_payload) }
|
70
93
|
before { payment_plan.destroy }
|
71
94
|
|
72
95
|
it { expect(payment_plan.status).to eq('Cancelled') }
|
73
96
|
end
|
74
97
|
|
75
98
|
describe '#suspend!', :vcr do
|
76
|
-
let(:payment_plan) { FatZebra::PaymentPlan.new(
|
99
|
+
let(:payment_plan) { FatZebra::PaymentPlan.new(valid_instalment_payload) }
|
77
100
|
before { payment_plan.save }
|
78
101
|
before { payment_plan.suspend! }
|
79
102
|
|
@@ -82,7 +105,7 @@ describe FatZebra::PaymentPlan do
|
|
82
105
|
end
|
83
106
|
|
84
107
|
describe '#active!', :vcr do
|
85
|
-
let(:payment_plan) { FatZebra::PaymentPlan.new(
|
108
|
+
let(:payment_plan) { FatZebra::PaymentPlan.new(valid_instalment_payload) }
|
86
109
|
before { payment_plan.save }
|
87
110
|
before { expect(payment_plan.suspend!.status).to eq('Suspended') }
|
88
111
|
before { payment_plan.active! }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fat_zebra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fat Zebra
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -234,6 +234,9 @@ files:
|
|
234
234
|
- spec/cassettes/FatZebra_PaymentPlan/_create/1_1_1.yml
|
235
235
|
- spec/cassettes/FatZebra_PaymentPlan/_create/1_1_2.yml
|
236
236
|
- spec/cassettes/FatZebra_PaymentPlan/_create/1_1_3.yml
|
237
|
+
- spec/cassettes/FatZebra_PaymentPlan/_create/perpetual_subscription/1_1_4_1.yml
|
238
|
+
- spec/cassettes/FatZebra_PaymentPlan/_create/perpetual_subscription/1_1_4_2.yml
|
239
|
+
- spec/cassettes/FatZebra_PaymentPlan/_create/perpetual_subscription/1_1_4_3.yml
|
237
240
|
- spec/cassettes/FatZebra_PaymentPlan/_delete/1_5_1.yml
|
238
241
|
- spec/cassettes/FatZebra_PaymentPlan/_destroy/1_6_1.yml
|
239
242
|
- spec/cassettes/FatZebra_PaymentPlan/_find/1_2_1.yml
|
@@ -362,7 +365,7 @@ files:
|
|
362
365
|
homepage: ''
|
363
366
|
licenses: []
|
364
367
|
metadata: {}
|
365
|
-
post_install_message:
|
368
|
+
post_install_message:
|
366
369
|
rdoc_options: []
|
367
370
|
require_paths:
|
368
371
|
- lib
|
@@ -377,8 +380,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
377
380
|
- !ruby/object:Gem::Version
|
378
381
|
version: '0'
|
379
382
|
requirements: []
|
380
|
-
rubygems_version: 3.1.
|
381
|
-
signing_key:
|
383
|
+
rubygems_version: 3.1.6
|
384
|
+
signing_key:
|
382
385
|
specification_version: 4
|
383
386
|
summary: Fat Zebra payments gem - integrate your ruby app with Fat Zebra
|
384
387
|
test_files: []
|