spree_emerchantpay_genesis 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +52 -0
  3. data/LICENSE +21 -0
  4. data/README.md +269 -0
  5. data/Rakefile +50 -0
  6. data/app/assets/images/spree/emerchantpay_logo.png +0 -0
  7. data/app/assets/javascripts/spree/emerchantpay_threeds.js +126 -0
  8. data/app/assets/javascripts/spree/frontend/card.min.js +3 -0
  9. data/app/assets/stylesheets/spree/emerchantpay_threeds.css +40 -0
  10. data/app/assets/stylesheets/spree/frontend/card.css +35 -0
  11. data/app/controllers/spree/api/v2/storefront/checkout_controller_decorator.rb +66 -0
  12. data/app/controllers/spree/api/v2/storefront/emerchantpay_notification_controller.rb +47 -0
  13. data/app/controllers/spree/api/v2/storefront/emerchantpay_threeds_controller.rb +61 -0
  14. data/app/controllers/spree/emerchantpay_threeds_controller.rb +31 -0
  15. data/app/helpers/spree/admin/payment_methods_helper.rb +110 -0
  16. data/app/helpers/spree_emerchantpay_genesis/mappers/genesis.rb +332 -0
  17. data/app/helpers/spree_emerchantpay_genesis/mappers/order.rb +70 -0
  18. data/app/helpers/spree_emerchantpay_genesis/mappers/transaction.rb +45 -0
  19. data/app/helpers/spree_emerchantpay_genesis/threeds_helper.rb +116 -0
  20. data/app/helpers/spree_emerchantpay_genesis/transaction_helper.rb +200 -0
  21. data/app/models/spree/gateway/emerchantpay_direct.rb +66 -0
  22. data/app/models/spree/payment_decorator.rb +13 -0
  23. data/app/models/spree/payment_processing_decorator.rb +28 -0
  24. data/app/models/spree_emerchantpay_genesis/base/data.rb +33 -0
  25. data/app/models/spree_emerchantpay_genesis/base/gateway.rb +65 -0
  26. data/app/models/spree_emerchantpay_genesis/data/address.rb +23 -0
  27. data/app/models/spree_emerchantpay_genesis/data/provider.rb +23 -0
  28. data/app/models/spree_emerchantpay_genesis/data/user.rb +32 -0
  29. data/app/models/spree_emerchantpay_genesis/db/application_record.rb +10 -0
  30. data/app/models/spree_emerchantpay_genesis/db/emerchantpay_payment.rb +35 -0
  31. data/app/models/spree_emerchantpay_genesis/genesis_provider.rb +203 -0
  32. data/app/repositories/spree_emerchantpay_genesis/emerchantpay_payments_repository.rb +120 -0
  33. data/app/repositories/spree_emerchantpay_genesis/spree_order_repository.rb +51 -0
  34. data/app/repositories/spree_emerchantpay_genesis/spree_payments_repository.rb +58 -0
  35. data/app/services/spree/payments/create_decorator.rb +63 -0
  36. data/app/services/spree_emerchantpay_genesis/base/payment_service.rb +83 -0
  37. data/app/services/spree_emerchantpay_genesis/notifications/service_handler.rb +33 -0
  38. data/app/services/spree_emerchantpay_genesis/sources/create_credit_card.rb +47 -0
  39. data/app/services/spree_emerchantpay_genesis/threeds/callback.rb +62 -0
  40. data/app/services/spree_emerchantpay_genesis/threeds/method_continue.rb +57 -0
  41. data/app/views/layouts/spree/method_continue.html.erb +17 -0
  42. data/app/views/spree/admin/payments/source_views/_emerchantpay_direct.html.erb +80 -0
  43. data/app/views/spree/checkout/payment/_emerchantpay_direct.html.erb +51 -0
  44. data/app/views/spree/emerchantpay_threeds/method_continue.html.erb +26 -0
  45. data/config/locales/en.yml +45 -0
  46. data/config/routes.rb +24 -0
  47. data/db/migrate/20230927072418_add_emerchantpay_payments.rb +34 -0
  48. data/db/migrate/20231128153140_add_callback_status_to_emerchantpay_payments.rb +8 -0
  49. data/lib/generators/spree_emerchantpay_genesis/install/install_generator.rb +37 -0
  50. data/lib/spree_emerchantpay_genesis/engine.rb +38 -0
  51. data/lib/spree_emerchantpay_genesis/factories.rb +11 -0
  52. data/lib/spree_emerchantpay_genesis/version.rb +7 -0
  53. data/lib/spree_emerchantpay_genesis.rb +8 -0
  54. metadata +421 -0
metadata ADDED
@@ -0,0 +1,421 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spree_emerchantpay_genesis
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - emerchantpay ltd.
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-02-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: genesis_ruby
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.1.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '6.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '6.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: securerandom
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.2.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.2.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: spree_backend
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '4.4'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 4.4.0
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '4.4'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 4.4.0
75
+ - !ruby/object:Gem::Dependency
76
+ name: spree_core
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '4.4'
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 4.4.0
85
+ type: :runtime
86
+ prerelease: false
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '4.4'
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 4.4.0
95
+ - !ruby/object:Gem::Dependency
96
+ name: spree_extension
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - '='
100
+ - !ruby/object:Gem::Version
101
+ version: 0.1.0
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - '='
107
+ - !ruby/object:Gem::Version
108
+ version: 0.1.0
109
+ - !ruby/object:Gem::Dependency
110
+ name: appraisal
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '2.5'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '2.5'
123
+ - !ruby/object:Gem::Dependency
124
+ name: database_cleaner
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '2.0'
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - "~>"
135
+ - !ruby/object:Gem::Version
136
+ version: '2.0'
137
+ - !ruby/object:Gem::Dependency
138
+ name: factory_bot
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: '4.7'
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: '4.7'
151
+ - !ruby/object:Gem::Dependency
152
+ name: faker
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - "~>"
156
+ - !ruby/object:Gem::Version
157
+ version: '3.2'
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - "~>"
163
+ - !ruby/object:Gem::Version
164
+ version: '3.2'
165
+ - !ruby/object:Gem::Dependency
166
+ name: faraday-retry
167
+ requirement: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '2.0'
172
+ type: :development
173
+ prerelease: false
174
+ version_requirements: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - "~>"
177
+ - !ruby/object:Gem::Version
178
+ version: '2.0'
179
+ - !ruby/object:Gem::Dependency
180
+ name: ffaker
181
+ requirement: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - "~>"
184
+ - !ruby/object:Gem::Version
185
+ version: '2.23'
186
+ type: :development
187
+ prerelease: false
188
+ version_requirements: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - "~>"
191
+ - !ruby/object:Gem::Version
192
+ version: '2.23'
193
+ - !ruby/object:Gem::Dependency
194
+ name: pronto
195
+ requirement: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - "~>"
198
+ - !ruby/object:Gem::Version
199
+ version: '0.11'
200
+ type: :development
201
+ prerelease: false
202
+ version_requirements: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - "~>"
205
+ - !ruby/object:Gem::Version
206
+ version: '0.11'
207
+ - !ruby/object:Gem::Dependency
208
+ name: pronto-rubocop
209
+ requirement: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - "~>"
212
+ - !ruby/object:Gem::Version
213
+ version: '0.11'
214
+ type: :development
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - "~>"
219
+ - !ruby/object:Gem::Version
220
+ version: '0.11'
221
+ - !ruby/object:Gem::Dependency
222
+ name: pry
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - "~>"
226
+ - !ruby/object:Gem::Version
227
+ version: '0.14'
228
+ type: :development
229
+ prerelease: false
230
+ version_requirements: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - "~>"
233
+ - !ruby/object:Gem::Version
234
+ version: '0.14'
235
+ - !ruby/object:Gem::Dependency
236
+ name: rspec
237
+ requirement: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - "~>"
240
+ - !ruby/object:Gem::Version
241
+ version: '3.12'
242
+ type: :development
243
+ prerelease: false
244
+ version_requirements: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - "~>"
247
+ - !ruby/object:Gem::Version
248
+ version: '3.12'
249
+ - !ruby/object:Gem::Dependency
250
+ name: rspec_junit_formatter
251
+ requirement: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - "~>"
254
+ - !ruby/object:Gem::Version
255
+ version: '0.6'
256
+ type: :development
257
+ prerelease: false
258
+ version_requirements: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - "~>"
261
+ - !ruby/object:Gem::Version
262
+ version: '0.6'
263
+ - !ruby/object:Gem::Dependency
264
+ name: rspec-rails
265
+ requirement: !ruby/object:Gem::Requirement
266
+ requirements:
267
+ - - "~>"
268
+ - !ruby/object:Gem::Version
269
+ version: '4.0'
270
+ type: :development
271
+ prerelease: false
272
+ version_requirements: !ruby/object:Gem::Requirement
273
+ requirements:
274
+ - - "~>"
275
+ - !ruby/object:Gem::Version
276
+ version: '4.0'
277
+ - !ruby/object:Gem::Dependency
278
+ name: rubocop
279
+ requirement: !ruby/object:Gem::Requirement
280
+ requirements:
281
+ - - "~>"
282
+ - !ruby/object:Gem::Version
283
+ version: '1.21'
284
+ type: :development
285
+ prerelease: false
286
+ version_requirements: !ruby/object:Gem::Requirement
287
+ requirements:
288
+ - - "~>"
289
+ - !ruby/object:Gem::Version
290
+ version: '1.21'
291
+ - !ruby/object:Gem::Dependency
292
+ name: rubocop-rspec
293
+ requirement: !ruby/object:Gem::Requirement
294
+ requirements:
295
+ - - "~>"
296
+ - !ruby/object:Gem::Version
297
+ version: '2.13'
298
+ type: :development
299
+ prerelease: false
300
+ version_requirements: !ruby/object:Gem::Requirement
301
+ requirements:
302
+ - - "~>"
303
+ - !ruby/object:Gem::Version
304
+ version: '2.13'
305
+ - !ruby/object:Gem::Dependency
306
+ name: simplecov
307
+ requirement: !ruby/object:Gem::Requirement
308
+ requirements:
309
+ - - "~>"
310
+ - !ruby/object:Gem::Version
311
+ version: '0.22'
312
+ type: :development
313
+ prerelease: false
314
+ version_requirements: !ruby/object:Gem::Requirement
315
+ requirements:
316
+ - - "~>"
317
+ - !ruby/object:Gem::Version
318
+ version: '0.22'
319
+ - !ruby/object:Gem::Dependency
320
+ name: vcr
321
+ requirement: !ruby/object:Gem::Requirement
322
+ requirements:
323
+ - - "~>"
324
+ - !ruby/object:Gem::Version
325
+ version: '6.2'
326
+ type: :development
327
+ prerelease: false
328
+ version_requirements: !ruby/object:Gem::Requirement
329
+ requirements:
330
+ - - "~>"
331
+ - !ruby/object:Gem::Version
332
+ version: '6.2'
333
+ description: This is a Payment Module for Spree that gives you the ability to process
334
+ payments through emerchantpay's Payment Gateway - Genesis.
335
+ email:
336
+ - client_integrations@emerchantpay.com
337
+ executables: []
338
+ extensions: []
339
+ extra_rdoc_files: []
340
+ files:
341
+ - CHANGELOG.md
342
+ - LICENSE
343
+ - README.md
344
+ - Rakefile
345
+ - app/assets/images/spree/emerchantpay_logo.png
346
+ - app/assets/javascripts/spree/emerchantpay_threeds.js
347
+ - app/assets/javascripts/spree/frontend/card.min.js
348
+ - app/assets/stylesheets/spree/emerchantpay_threeds.css
349
+ - app/assets/stylesheets/spree/frontend/card.css
350
+ - app/controllers/spree/api/v2/storefront/checkout_controller_decorator.rb
351
+ - app/controllers/spree/api/v2/storefront/emerchantpay_notification_controller.rb
352
+ - app/controllers/spree/api/v2/storefront/emerchantpay_threeds_controller.rb
353
+ - app/controllers/spree/emerchantpay_threeds_controller.rb
354
+ - app/helpers/spree/admin/payment_methods_helper.rb
355
+ - app/helpers/spree_emerchantpay_genesis/mappers/genesis.rb
356
+ - app/helpers/spree_emerchantpay_genesis/mappers/order.rb
357
+ - app/helpers/spree_emerchantpay_genesis/mappers/transaction.rb
358
+ - app/helpers/spree_emerchantpay_genesis/threeds_helper.rb
359
+ - app/helpers/spree_emerchantpay_genesis/transaction_helper.rb
360
+ - app/models/spree/gateway/emerchantpay_direct.rb
361
+ - app/models/spree/payment_decorator.rb
362
+ - app/models/spree/payment_processing_decorator.rb
363
+ - app/models/spree_emerchantpay_genesis/base/data.rb
364
+ - app/models/spree_emerchantpay_genesis/base/gateway.rb
365
+ - app/models/spree_emerchantpay_genesis/data/address.rb
366
+ - app/models/spree_emerchantpay_genesis/data/provider.rb
367
+ - app/models/spree_emerchantpay_genesis/data/user.rb
368
+ - app/models/spree_emerchantpay_genesis/db/application_record.rb
369
+ - app/models/spree_emerchantpay_genesis/db/emerchantpay_payment.rb
370
+ - app/models/spree_emerchantpay_genesis/genesis_provider.rb
371
+ - app/repositories/spree_emerchantpay_genesis/emerchantpay_payments_repository.rb
372
+ - app/repositories/spree_emerchantpay_genesis/spree_order_repository.rb
373
+ - app/repositories/spree_emerchantpay_genesis/spree_payments_repository.rb
374
+ - app/services/spree/payments/create_decorator.rb
375
+ - app/services/spree_emerchantpay_genesis/base/payment_service.rb
376
+ - app/services/spree_emerchantpay_genesis/notifications/service_handler.rb
377
+ - app/services/spree_emerchantpay_genesis/sources/create_credit_card.rb
378
+ - app/services/spree_emerchantpay_genesis/threeds/callback.rb
379
+ - app/services/spree_emerchantpay_genesis/threeds/method_continue.rb
380
+ - app/views/layouts/spree/method_continue.html.erb
381
+ - app/views/spree/admin/payments/source_views/_emerchantpay_direct.html.erb
382
+ - app/views/spree/checkout/payment/_emerchantpay_direct.html.erb
383
+ - app/views/spree/emerchantpay_threeds/method_continue.html.erb
384
+ - config/locales/en.yml
385
+ - config/routes.rb
386
+ - db/migrate/20230927072418_add_emerchantpay_payments.rb
387
+ - db/migrate/20231128153140_add_callback_status_to_emerchantpay_payments.rb
388
+ - lib/generators/spree_emerchantpay_genesis/install/install_generator.rb
389
+ - lib/spree_emerchantpay_genesis.rb
390
+ - lib/spree_emerchantpay_genesis/engine.rb
391
+ - lib/spree_emerchantpay_genesis/factories.rb
392
+ - lib/spree_emerchantpay_genesis/version.rb
393
+ homepage: https://emerchantpay.com
394
+ licenses:
395
+ - MIT
396
+ metadata:
397
+ homepage_uri: https://emerchantpay.com
398
+ source_code_uri: https://github.com/emerchantpay/spree-emp-plugin
399
+ changelog_uri: https://github.com/emerchantpay/spree-emp-plugin/blob/main/CHANGELOG.md
400
+ documentation_uri: https://github.com/emerchantpay/spree-emp-plugin/blob/main/README.md
401
+ post_install_message:
402
+ rdoc_options: []
403
+ require_paths:
404
+ - lib
405
+ required_ruby_version: !ruby/object:Gem::Requirement
406
+ requirements:
407
+ - - ">="
408
+ - !ruby/object:Gem::Version
409
+ version: 2.7.0
410
+ required_rubygems_version: !ruby/object:Gem::Requirement
411
+ requirements:
412
+ - - ">="
413
+ - !ruby/object:Gem::Version
414
+ version: '0'
415
+ requirements:
416
+ - none
417
+ rubygems_version: 3.2.33
418
+ signing_key:
419
+ specification_version: 4
420
+ summary: emerchantpay Gateway Module for Spree
421
+ test_files: []