genesis_ruby 0.1.7 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/Gemfile.lock +45 -39
  4. data/README.md +246 -0
  5. data/VERSION +1 -1
  6. data/lib/genesis_ruby/api/constants/transactions/parameters/cash_payments/company_types.rb +45 -0
  7. data/lib/genesis_ruby/api/constants/transactions/parameters/cash_payments/genders.rb +27 -0
  8. data/lib/genesis_ruby/api/constants/transactions/parameters/cash_payments/marital_statuses.rb +39 -0
  9. data/lib/genesis_ruby/api/constants/transactions/parameters/mobile/apple_pay/payment_subtypes.rb +29 -0
  10. data/lib/genesis_ruby/api/constants/transactions/parameters/mobile/google_pay/payment_subtypes.rb +29 -0
  11. data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_code_currencies.rb +128 -0
  12. data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_codes.rb +600 -0
  13. data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/payment_types.rb +36 -0
  14. data/lib/genesis_ruby/api/constants/transactions/parameters/wallets/pay_pal/payment_types.rb +31 -0
  15. data/lib/genesis_ruby/api/mixins/requests/attribute_validation.rb +138 -4
  16. data/lib/genesis_ruby/api/mixins/requests/birth_date_attributes.rb +22 -0
  17. data/lib/genesis_ruby/api/mixins/requests/customer_address/billing_info_attributes.rb +11 -10
  18. data/lib/genesis_ruby/api/mixins/requests/customer_address/customer_info_attributes.rb +1 -1
  19. data/lib/genesis_ruby/api/mixins/requests/customer_address/shipping_info_attributes.rb +11 -10
  20. data/lib/genesis_ruby/api/mixins/requests/financial/cards/credit_card_attributes.rb +7 -0
  21. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_attributes.rb +21 -20
  22. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_indian_card_attributes.rb +15 -39
  23. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/recurring_type_attributes.rb +15 -9
  24. data/lib/genesis_ruby/api/mixins/requests/financial/cards/tokenization_attributes.rb +9 -0
  25. data/lib/genesis_ruby/api/mixins/requests/financial/consumer_identifier_attributes.rb +26 -0
  26. data/lib/genesis_ruby/api/mixins/requests/financial/mobile/apple_pay_token_attributes.rb +51 -0
  27. data/lib/genesis_ruby/api/mixins/requests/financial/mobile/google_pay_token_attributes.rb +50 -0
  28. data/lib/genesis_ruby/api/mixins/requests/financial/online_banking_payments/virtual_payment_address_attributes.rb +27 -0
  29. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/browser.rb +11 -22
  30. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/card_holder_account.rb +81 -49
  31. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/common_attributes.rb +23 -0
  32. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/control.rb +13 -26
  33. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/merchant_risk.rb +21 -58
  34. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/purchase.rb +8 -11
  35. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/sdk.rb +10 -10
  36. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/wpf_attributes.rb +9 -0
  37. data/lib/genesis_ruby/api/request.rb +4 -2
  38. data/lib/genesis_ruby/api/requests/base/financials/credit_card.rb +6 -4
  39. data/lib/genesis_ruby/api/requests/base/financials/south_american_payments.rb +59 -0
  40. data/lib/genesis_ruby/api/requests/base/reference.rb +3 -2
  41. data/lib/genesis_ruby/api/requests/financial/cards/argencard.rb +26 -0
  42. data/lib/genesis_ruby/api/requests/financial/cards/aura.rb +26 -0
  43. data/lib/genesis_ruby/api/requests/financial/cards/authorize.rb +10 -2
  44. data/lib/genesis_ruby/api/requests/financial/cards/authorize3d.rb +19 -10
  45. data/lib/genesis_ruby/api/requests/financial/cards/cabal.rb +26 -0
  46. data/lib/genesis_ruby/api/requests/financial/cards/cencosud.rb +26 -0
  47. data/lib/genesis_ruby/api/requests/financial/cards/elo.rb +26 -0
  48. data/lib/genesis_ruby/api/requests/financial/cards/naranja.rb +26 -0
  49. data/lib/genesis_ruby/api/requests/financial/cards/nativa.rb +26 -0
  50. data/lib/genesis_ruby/api/requests/financial/cards/sale.rb +10 -2
  51. data/lib/genesis_ruby/api/requests/financial/cards/sale3d.rb +19 -10
  52. data/lib/genesis_ruby/api/requests/financial/cards/tarjeta_shopping.rb +26 -0
  53. data/lib/genesis_ruby/api/requests/financial/cards/threeds/v2/method_continue.rb +2 -2
  54. data/lib/genesis_ruby/api/requests/financial/cash_payments/baloto.rb +26 -0
  55. data/lib/genesis_ruby/api/requests/financial/cash_payments/banco_de_occidente.rb +26 -0
  56. data/lib/genesis_ruby/api/requests/financial/cash_payments/boleto.rb +26 -0
  57. data/lib/genesis_ruby/api/requests/financial/cash_payments/efecty.rb +26 -0
  58. data/lib/genesis_ruby/api/requests/financial/cash_payments/oxxo.rb +26 -0
  59. data/lib/genesis_ruby/api/requests/financial/cash_payments/pago_facil.rb +26 -0
  60. data/lib/genesis_ruby/api/requests/financial/cash_payments/pix.rb +92 -0
  61. data/lib/genesis_ruby/api/requests/financial/cash_payments/redpagos.rb +26 -0
  62. data/lib/genesis_ruby/api/requests/financial/mobile/apple_pay.rb +91 -0
  63. data/lib/genesis_ruby/api/requests/financial/mobile/google_pay.rb +108 -0
  64. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/bancomer.rb +33 -0
  65. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/bradesco.rb +33 -0
  66. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/davivienda.rb +34 -0
  67. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/itau.rb +33 -0
  68. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/online_banking/pay_in.rb +157 -0
  69. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/pse.rb +33 -0
  70. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/rapi_pago.rb +33 -0
  71. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/santander.rb +33 -0
  72. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/webpay.rb +33 -0
  73. data/lib/genesis_ruby/api/requests/financial/void.rb +2 -2
  74. data/lib/genesis_ruby/api/requests/financial/wallets/pay_pay.rb +65 -0
  75. data/lib/genesis_ruby/api/requests/non_financial/reconcile/date_range.rb +2 -2
  76. data/lib/genesis_ruby/api/requests/wpf/create.rb +11 -15
  77. data/lib/genesis_ruby/api/requests/wpf/reconcile.rb +2 -2
  78. data/lib/genesis_ruby/dependencies.rb +1 -0
  79. data/lib/genesis_ruby/utils/common.rb +26 -0
  80. data/lib/genesis_ruby/version.rb +1 -1
  81. metadata +46 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5629a8aa5e0635fa0106507b7ca62e605065007441fff2479c1ec390237d8382
4
- data.tar.gz: c618d130f46775abfeda2cc340050c6cdb5492fcd97ba64a2bc0bafac5db086b
3
+ metadata.gz: 4b6a3bc808c8337039cad21fe38a3a45bee0cf9d4ccc9c1f60910d42b4e5f625
4
+ data.tar.gz: e120729e9f6bb2434e5997951cd34b4eca9239474b85f695a55d865bc9c4d4b9
5
5
  SHA512:
6
- metadata.gz: 592d0e476d4e7a0bb1920eef3c807ff420adb6c35e3bd32a6ad1bef6e7582ddc90d4b1b4d7d1998d9873865af22ded0c7bcacc2950331234705f1658a61a71f9
7
- data.tar.gz: c3d712b3f128740ce84d32bad8302e030fc2826cb0f0b06cfaec1e26e2e96efe0ef2f271e6afe869b72b9db823f0724644dab4b3b30a1e6240008cc740617a8a
6
+ metadata.gz: 4dbdef97fd80acf9e748d2e1279c8067522c0ba8091f53447f13c5c1c3e199fe3d0dd2344e1100db16170c33ea580c79755664f81c74fa7c63847723b68b622e
7
+ data.tar.gz: 1131aedc74b6ed7f60948cdcc9b53c268317519c78d6be600fbbc2f6a62744368c627e914037d202bcaf0cf267d8c6a734e56e18a95b02f21430c539a62cf47c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,44 @@
1
+ 0.1.9
2
+ -----
3
+ **Features**:
4
+
5
+ * Added PayPal transaction request
6
+ * Added PIX transaction request
7
+ * Added Boleto transaction request
8
+ * Added Neighborhood parameter support to Billing and Shipping address attributes
9
+ * Added Argencard transaction request
10
+ * Added Aura transaction request
11
+ * Added Baloto transaction request
12
+ * Added Banco de Occidente transaction request
13
+ * Added Bancomer transaction request
14
+ * Added Bradesco transaction request
15
+ * Added Cabal transaction request
16
+ * Added Cencosud transaction request
17
+ * Added Davivienda transaction request
18
+ * Added Efecty transaction request
19
+ * Added Elo transaction request
20
+ * Added Itau transaction request
21
+ * Added Naranja transaction request
22
+ * Added Nativa transaction request
23
+ * Added OXXO transaction request
24
+ * Added Pago Facil transaction request
25
+ * Added PSE transaction request
26
+ * Added RapiPago transaction request
27
+ * Added Redpagos transaction request
28
+ * Added Santander transaction request
29
+ * Added Tarjeta Shopping transaction request
30
+ * Added Webpay transaction request
31
+
32
+ 0.1.8
33
+ -----
34
+ **Features**:
35
+
36
+ * Added Apple Pay transaction request support
37
+ * Added Google Pay transaction request support
38
+ * Added Online Banking PayIn transaction request support
39
+ * Updated transform amount logic during request execution
40
+ * Added 3DSv2 parameters validations
41
+
1
42
  0.1.7
2
43
  -----
3
44
  **Features**:
data/Gemfile.lock CHANGED
@@ -1,22 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- genesis_ruby (0.1.7)
4
+ genesis_ruby (0.1.9)
5
5
  net-http (~> 0.3.2)
6
6
  nokogiri (~> 1.14)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.8.6)
12
- public_suffix (>= 2.0.2, < 6.0)
11
+ addressable (2.8.7)
12
+ public_suffix (>= 2.0.2, < 7.0)
13
13
  ast (2.4.2)
14
14
  base64 (0.2.0)
15
- bigdecimal (3.1.7)
16
- concurrent-ruby (1.2.3)
15
+ bigdecimal (3.1.8)
16
+ concurrent-ruby (1.3.4)
17
17
  crack (1.0.0)
18
18
  bigdecimal
19
19
  rexml
20
+ csv (3.3.0)
20
21
  diff-lcs (1.5.1)
21
22
  faker (2.23.0)
22
23
  i18n (>= 1.8.11, < 2)
@@ -25,32 +26,35 @@ GEM
25
26
  faraday-net_http (>= 2.0, < 3.1)
26
27
  ruby2_keywords (>= 0.0.4)
27
28
  faraday-net_http (3.0.2)
28
- faraday-retry (2.2.0)
29
+ faraday-retry (2.2.1)
29
30
  faraday (~> 2.0)
30
- gitlab (4.19.0)
31
+ gitlab (4.20.1)
31
32
  httparty (~> 0.20)
32
33
  terminal-table (>= 1.5.1)
33
- hashdiff (1.1.0)
34
- httparty (0.21.0)
34
+ hashdiff (1.1.1)
35
+ httparty (0.22.0)
36
+ csv
35
37
  mini_mime (>= 1.0.0)
36
38
  multi_xml (>= 0.5.2)
37
- i18n (1.14.4)
39
+ i18n (1.14.6)
38
40
  concurrent-ruby (~> 1.0)
39
- json (2.7.1)
41
+ json (2.7.2)
40
42
  language_server-protocol (3.17.0.3)
41
43
  mini_mime (1.1.5)
44
+ mini_portile2 (2.8.7)
42
45
  multi_xml (0.6.0)
43
- mustermann (3.0.0)
46
+ mustermann (3.0.3)
44
47
  ruby2_keywords (~> 0.0.1)
45
48
  net-http (0.3.2)
46
49
  uri
47
- nokogiri (1.16.6-x86_64-darwin)
50
+ nokogiri (1.15.6)
51
+ mini_portile2 (~> 2.8.2)
48
52
  racc (~> 1.4)
49
53
  octokit (7.2.0)
50
54
  faraday (>= 1, < 3)
51
55
  sawyer (~> 0.9)
52
- parallel (1.24.0)
53
- parser (3.3.0.5)
56
+ parallel (1.26.3)
57
+ parser (3.3.5.0)
54
58
  ast (~> 2.4.1)
55
59
  racc
56
60
  pronto (0.11.2)
@@ -64,55 +68,57 @@ GEM
64
68
  pronto-rubocop (0.11.5)
65
69
  pronto (~> 0.11.0)
66
70
  rubocop (>= 0.63.1, < 2.0)
67
- public_suffix (5.0.4)
68
- racc (1.7.3)
69
- rack (2.2.9)
71
+ public_suffix (5.1.1)
72
+ racc (1.8.1)
73
+ rack (2.2.10)
70
74
  rack-protection (3.2.0)
71
75
  base64 (>= 0.1.0)
72
76
  rack (~> 2.2, >= 2.2.4)
73
77
  rainbow (3.1.1)
74
- rake (13.1.0)
75
- regexp_parser (2.9.0)
76
- rexml (3.2.6)
78
+ rake (13.2.1)
79
+ regexp_parser (2.9.2)
80
+ rexml (3.3.8)
77
81
  rspec (3.13.0)
78
82
  rspec-core (~> 3.13.0)
79
83
  rspec-expectations (~> 3.13.0)
80
84
  rspec-mocks (~> 3.13.0)
81
- rspec-core (3.13.0)
85
+ rspec-core (3.13.1)
82
86
  rspec-support (~> 3.13.0)
83
- rspec-expectations (3.13.0)
87
+ rspec-expectations (3.13.3)
84
88
  diff-lcs (>= 1.2.0, < 2.0)
85
89
  rspec-support (~> 3.13.0)
86
- rspec-mocks (3.13.0)
90
+ rspec-mocks (3.13.2)
87
91
  diff-lcs (>= 1.2.0, < 2.0)
88
92
  rspec-support (~> 3.13.0)
89
93
  rspec-support (3.13.1)
90
94
  rspec_junit_formatter (0.6.0)
91
95
  rspec-core (>= 2, < 4, != 2.12.0)
92
- rubocop (1.62.1)
96
+ rubocop (1.66.1)
93
97
  json (~> 2.3)
94
98
  language_server-protocol (>= 3.17.0)
95
99
  parallel (~> 1.10)
96
100
  parser (>= 3.3.0.2)
97
101
  rainbow (>= 2.2.2, < 4.0)
98
- regexp_parser (>= 1.8, < 3.0)
99
- rexml (>= 3.2.5, < 4.0)
100
- rubocop-ast (>= 1.31.1, < 2.0)
102
+ regexp_parser (>= 2.4, < 3.0)
103
+ rubocop-ast (>= 1.32.2, < 2.0)
101
104
  ruby-progressbar (~> 1.7)
102
105
  unicode-display_width (>= 2.4.0, < 3.0)
103
- rubocop-ast (1.31.2)
104
- parser (>= 3.3.0.4)
105
- rubocop-capybara (2.20.0)
106
- rubocop (~> 1.41)
107
- rubocop-factory_bot (2.25.1)
106
+ rubocop-ast (1.32.3)
107
+ parser (>= 3.3.1.0)
108
+ rubocop-capybara (2.21.0)
108
109
  rubocop (~> 1.41)
110
+ rubocop-factory_bot (2.26.1)
111
+ rubocop (~> 1.61)
109
112
  rubocop-faker (1.1.0)
110
113
  faker (>= 2.12.0)
111
114
  rubocop (>= 0.82.0)
112
- rubocop-rspec (2.27.1)
115
+ rubocop-rspec (2.31.0)
113
116
  rubocop (~> 1.40)
114
117
  rubocop-capybara (~> 2.17)
115
118
  rubocop-factory_bot (~> 2.22)
119
+ rubocop-rspec_rails (~> 2.28)
120
+ rubocop-rspec_rails (2.29.1)
121
+ rubocop (~> 1.61)
116
122
  ruby-progressbar (1.13.0)
117
123
  ruby2_keywords (0.0.5)
118
124
  rugged (1.7.2)
@@ -126,11 +132,11 @@ GEM
126
132
  tilt (~> 2.0)
127
133
  terminal-table (3.0.2)
128
134
  unicode-display_width (>= 1.1.1, < 3)
129
- thor (1.3.1)
130
- tilt (2.3.0)
131
- unicode-display_width (2.5.0)
132
- uri (0.13.0)
133
- webmock (3.23.0)
135
+ thor (1.3.2)
136
+ tilt (2.4.0)
137
+ unicode-display_width (2.6.0)
138
+ uri (0.13.1)
139
+ webmock (3.24.0)
134
140
  addressable (>= 2.8.0)
135
141
  crack (>= 0.3.2)
136
142
  hashdiff (>= 0.4.0, < 2.0.0)
data/README.md CHANGED
@@ -447,6 +447,214 @@ end
447
447
 
448
448
  </details>
449
449
 
450
+ ### Apple Pay Request
451
+
452
+ Apple Pay is a mobile payment solution available on iOS devices with Touch ID / Face ID support. Apple Pay allows shoppers to purchase with credit and debit cards linked to their devices.
453
+
454
+ <details>
455
+ <summary>Apple Pay Transaction Example</summary>
456
+
457
+ ```ruby
458
+ require 'genesis_ruby'
459
+
460
+ begin
461
+ genesis = GenesisRuby::Genesis.for(config: configuration, request: GenesisRuby::Api::Requests::Financial::Mobile::ApplePay) do |request|
462
+ # Common Attributes
463
+ request.transaction_id = '12345-67890'
464
+ request.amount = '0.99'
465
+ request.currency = 'EUR'
466
+ request.usage = 'Example usage'
467
+ request.customer_email = 'travis@example.com'
468
+ request.customer_phone = '+1987987987987'
469
+
470
+ request.payment_subtype = GenesisRuby::Api::Constants::Transactions::Parameters::Mobile::ApplePay::PaymentSubtypes::SALE
471
+
472
+ # Billing Attributes
473
+ request.billing_first_name = 'Travis'
474
+ request.billing_last_name = 'Pastrana'
475
+ request.billing_address1 = 'Muster Str. 12'
476
+ request.billing_zip_code = '10178'
477
+ request.billing_city = 'Los Angeles'
478
+ request.billing_state = 'CA'
479
+ request.billing_country = 'US'
480
+
481
+ # Apple Pay Payment Token
482
+ json_token = '{"paymentData":{"version":"EC_v1","data":"MgcrhHr/uhfRy7zxMOvahhf5sp+ZfUsWADlG5OhvZ8vEAybEouyk4tT8oYaOqlfNTdkJZl2tmCgyLReibOjW2RiXzw5S9ZtA6ISnEBjNFla9Hju1KJnxQ+QFIdSlhEDOqN/Wk9kSFz2mnT8wajaG6mytpXhzCxvl5ElCp0gm0wMb82lvpf6my5TIu+CuANPZ2g/kslqKUGEjQHhO3FVqmiEj2YpkrlhXcvFu1GalTOWgjnLVCMz8l8DCQek/UIZQ3ZiJEoQTlEZRzXlwG8FlEp/QwbLiIlQfDLCtu3pBH0EaOeQ1OwupXs64EYfL+DEzYKdpi7dE9Y93zcXR6y2qsawBC8lCeI8zGc+kRFQJ5IrPd81BRZep3xsHwh1uki2dfx2taLyjxyCWWKaUWCzYI1p/u7YsypYEMj3np+MHfg==","signature":"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID4zCCA4igAwIBAgIITDBBSVGdVDYwCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxl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0bmcubCYkhYQaZDwmSHQAAMYIBjTCCAYkCAQEwgYYwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghMMEFJUZ1UNjANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0yMDA0MTUwOTUyMzFaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIH6Sjj/7kIxJVk5zs9luvqH7aeFAnYD6fXFqTzAIX9iuMAoGCCqGSM49BAMCBEgwRgIhAKzIAjmbbWFgTcbtau2mTaQ7Z4mwWpXATUPA5E2Y4UVcAiEA9m/1aZEshDD84jHpaa75AQeCGpwKEZaGt7FZcU3Y21EAAAAAAAA=","header":{"wrappedKey": "wrapped key", "ephemeralPublicKey":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEJsaMBlzR3D0H7xKwDncLNGOEcsl6Jilx5d+MDI/1QFxuIf6a0fY5qgOwnuLgZepqc3AVeU1RV8enPCQSWfFKRg==","publicKeyHash":"QOmvMaoCNYk5tv+69KC1i2UCFQcOl6LYPIJfYAT+SLQ=","transactionId":"ccedaf3f32efcc971259694f0efd0dcaa0ed545e7a31a0f7ec8e1c110656c25b"}},"paymentMethod":{"displayName":"Visa 0225","network":"Visa","type":"debit"},"transactionIdentifier":"CCEDAF3F32EFCC971259694F0EFD0DCAA0ED545E7A31A0F7EC8E1C110656C25B"}'
483
+
484
+ # Set Apple Pay token from a JSON string
485
+ request.json_token = json_token
486
+
487
+ # Alternatively you can set every token attributes
488
+ # token = JSON.parse json_token
489
+ # request.token_version = token['paymentData']['version']
490
+ # request.token_data = token['paymentData']['data']
491
+ # request.token_signature = token['paymentData']['signature']
492
+ # request.token_ephemeral_public_key = token['paymentData']['header']['ephemeralPublicKey']
493
+ # request.token_public_key_hash = token['paymentData']['header']['publicKeyHash']
494
+ # request.token_transaction_id = token['paymentData']['header']['transactionId']
495
+ # request.token_display_name = token['paymentMethod']['displayName']
496
+ # request.token_network = token['paymentMethod']['network']
497
+ # request.token_type = token['paymentMethod']['type']
498
+ # request.token_transaction_identifier = token['transactionIdentifier']
499
+ end.execute
500
+
501
+ puts genesis.response.response_object
502
+ rescue GenesisRuby::Error => error
503
+ puts error.message
504
+ end
505
+ ```
506
+
507
+ </details>
508
+
509
+ <details>
510
+ <summary>Apple Pay Web Payment Form Example</summary>
511
+
512
+ ```ruby
513
+ require 'genesis_ruby'
514
+
515
+ begin
516
+ genesis = GenesisRuby::Genesis.for(config: configuration, request: GenesisRuby::Api::Requests::Wpf::Create) do |request|
517
+ # Common Attributes
518
+ request.transaction_id = '12345-67890'
519
+ request.amount = '0.99'
520
+ request.currency = 'EUR'
521
+ request.usage = 'Example usage'
522
+ request.description = 'You are about to complete you purchase'
523
+ request.customer_email = 'travis@example.com'
524
+ request.customer_phone = '+1987987987987'
525
+ request.notification_url = 'https://www.example.com/notification'
526
+ request.return_success_url = 'https://www.example.com/success'
527
+ request.return_cancel_url = 'https://www.example.com/failure'
528
+ request.return_failure_url = 'https://www.example.com/cancel.html'
529
+ request.return_pending_url = 'https://www.example.com/payment-pending.html'
530
+
531
+ # Transaction Types
532
+ request.add_transaction_type('apple_pay', { payment_subtype: GenesisRuby::Api::Constants::Transactions::Parameters::Mobile::ApplePay::PaymentSubtypes::AUTHORIZE })
533
+
534
+ # Billing Attributes
535
+ request.billing_first_name = 'Travis'
536
+ request.billing_last_name = 'Pastrana'
537
+ request.billing_address1 = 'Muster Str. 12'
538
+ request.billing_zip_code = '10178'
539
+ request.billing_city = 'Los Angeles'
540
+ request.billing_state = 'CA'
541
+ request.billing_country = 'US'
542
+ end.execute
543
+
544
+ puts genesis.response.response_object
545
+
546
+ rescue GenesisRuby::Error => error
547
+ puts error.message
548
+ end
549
+ ```
550
+
551
+ </details>
552
+
553
+ ### Google Pay Request
554
+
555
+ Google Pay allows shoppers to purchase with credit and debit cards linked to their Google account.
556
+
557
+ <details>
558
+ <summary>Google Pay Transaction Example</summary>
559
+
560
+ ```ruby
561
+ require 'genesis_ruby'
562
+
563
+ begin
564
+ genesis = GenesisRuby::Genesis.for(config: configuration, request: GenesisRuby::Api::Requests::Financial::Mobile::GooglePay) do |request|
565
+ # Common Attributes
566
+ request.transaction_id = '12345-67890'
567
+ request.amount = '0.99'
568
+ request.currency = 'EUR'
569
+ request.usage = 'Example usage'
570
+ request.customer_email = 'travis@example.com'
571
+ request.customer_phone = '+1987987987987'
572
+
573
+ request.payment_subtype = GenesisRuby::Api::Constants::Transactions::Parameters::Mobile::GooglePay::PaymentSubtypes::SALE
574
+
575
+ # Billing Attributes
576
+ request.billing_first_name = 'Travis'
577
+ request.billing_last_name = 'Pastrana'
578
+ request.billing_address1 = 'Muster Str. 12'
579
+ request.billing_zip_code = '10178'
580
+ request.billing_city = 'Los Angeles'
581
+ request.billing_state = 'CA'
582
+ request.billing_country = 'US'
583
+
584
+ # Google Pay Payment Token
585
+ json_token = '{
586
+ "protocolVersion":"ECv2",
587
+ "signature":"MEQCIH6Q4OwQ0jAceFEkGF0JID6sJNXxOEi4r+mA7biRxqBQAiAondqoUpU/bdsrAOpZIsrHQS9nwiiNwOrr24RyPeHA0Q\u003d\u003d",
588
+ "intermediateSigningKey":{
589
+ "signedKey": "{\"keyExpiration\":\"1542323393147\",\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM43yRydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw\\u003d\\u003d\"}",
590
+ "signatures": ["MEYCIQCO2EIi48s8VTH+ilMEpoXLFfkxAwHjfPSCVED/QDSHmQIhALLJmrUlNAY8hDQRV/y1iKZGsWpeNmIP+z+tCQHQxP0v"]
591
+ },
592
+ "signedMessage":"{\"tag\":\"jpGz1F1Bcoi/fCNxI9n7Qrsw7i7KHrGtTf3NrRclt+U\\u003d\",\"ephemeralPublicKey\":\"BJatyFvFPPD21l8/uLP46Ta1hsKHndf8Z+tAgk+DEPQgYTkhHy19cF3h/bXs0tWTmZtnNm+vlVrKbRU9K8+7cZs\\u003d\",\"encryptedMessage\":\"mKOoXwi8OavZ\"}"
593
+ }'
594
+
595
+ # Set Google Pay token from a JSON string
596
+ request.json_token = json_token
597
+
598
+ # Alternatively you can set every token attributes
599
+ # token = JSON.parse json_token
600
+ # request.token_protocol_version = token['protocolVersion']
601
+ # request.token_signature = token['signature']
602
+ # request.token_signed_key = token['intermediateSigningKey']['signedKey']
603
+ # request.token_signatures = token['intermediateSigningKey']['signatures']
604
+ # request.token_signed_message = token['signedMessage']
605
+ end.execute
606
+
607
+ puts genesis.response.response_object
608
+ rescue GenesisRuby::Error => error
609
+ puts error.message
610
+ end
611
+ ```
612
+
613
+ </details>
614
+
615
+ <details>
616
+ <summary>Google Pay Web Payment Form Example</summary>
617
+
618
+ ```ruby
619
+ require 'genesis_ruby'
620
+
621
+ begin
622
+ genesis = GenesisRuby::Genesis.for(config: configuration, request: GenesisRuby::Api::Requests::Wpf::Create) do |request|
623
+ # Common Attributes
624
+ request.transaction_id = '12345-67890'
625
+ request.amount = '0.99'
626
+ request.currency = 'EUR'
627
+ request.usage = 'Example usage'
628
+ request.description = 'You are about to complete you purchase'
629
+ request.customer_email = 'travis@example.com'
630
+ request.customer_phone = '+1987987987987'
631
+ request.notification_url = 'https://www.example.com/notification'
632
+ request.return_success_url = 'https://www.example.com/success'
633
+ request.return_cancel_url = 'https://www.example.com/failure'
634
+ request.return_failure_url = 'https://www.example.com/cancel.html'
635
+ request.return_pending_url = 'https://www.example.com/payment-pending.html'
636
+
637
+ # Transaction Types
638
+ request.add_transaction_type('google_pay', { payment_subtype: GenesisRuby::Api::Constants::Transactions::Parameters::Mobile::GooglePay::PaymentSubtypes::AUTHORIZE })
639
+
640
+ # Billing Attributes
641
+ request.billing_first_name = 'Travis'
642
+ request.billing_last_name = 'Pastrana'
643
+ request.billing_address1 = 'Muster Str. 12'
644
+ request.billing_zip_code = '10178'
645
+ request.billing_city = 'Los Angeles'
646
+ request.billing_state = 'CA'
647
+ request.billing_country = 'US'
648
+ end.execute
649
+
650
+ puts genesis.response.response_object
651
+
652
+ rescue GenesisRuby::Error => error
653
+ puts error.message
654
+ end
655
+ ```
656
+
657
+ </details>
450
658
 
451
659
  ### Recurring
452
660
 
@@ -784,16 +992,54 @@ You can use the following request classes to initialize the Genesis client:
784
992
  ```ruby
785
993
  # Financial
786
994
  ## Cards
995
+ GenesisRuby::Api::Requests::Financial::Cards::Argencard
996
+ GenesisRuby::Api::Requests::Financial::Cards::Aura
787
997
  GenesisRuby::Api::Requests::Financial::Cards::Authorize
788
998
  GenesisRuby::Api::Requests::Financial::Cards::Authorize3d
999
+ GenesisRuby::Api::Requests::Financial::Cards::Cabal
1000
+ GenesisRuby::Api::Requests::Financial::Cards::Cencosud
1001
+ GenesisRuby::Api::Requests::Financial::Cards::Elo
1002
+ GenesisRuby::Api::Requests::Financial::Cards::Naranja
1003
+ GenesisRuby::Api::Requests::Financial::Cards::Nativa
789
1004
  GenesisRuby::Api::Requests::Financial::Cards::Sale
790
1005
  GenesisRuby::Api::Requests::Financial::Cards::Sale3d
1006
+ GenesisRuby::Api::Requests::Financial::Cards::TarjetaShopping
1007
+
1008
+ ## Mobile
1009
+ GenesisRuby::Api::Requests::Financial::Mobile::ApplePay
1010
+ GenesisRuby::Api::Requests::Financial::Mobile::GooglePay
1011
+
1012
+ ## Wallets
1013
+ GenesisRuby::Api::Requests::Financial::Wallets::PayPal
1014
+
1015
+ ## Cash Payments
1016
+ GenesisRuby::Api::Requests::Financial::CashPayments::Baloto
1017
+ GenesisRuby::Api::Requests::Financial::CashPayments::BancoDeOccidente
1018
+ GenesisRuby::Api::Requests::Financial::CashPayments::Boleto
1019
+ GenesisRuby::Api::Requests::Financial::CashPayments::Efecty
1020
+ GenesisRuby::Api::Requests::Financial::CashPayments::Oxxo
1021
+ GenesisRuby::Api::Requests::Financial::CashPayments::PagoFacil
1022
+ GenesisRuby::Api::Requests::Financial::CashPayments::Pix
1023
+ GenesisRuby::Api::Requests::Financial::CashPayments::Redpagos
791
1024
 
792
1025
  # Web Payment Form
793
1026
  ## Create
794
1027
  GenesisRuby::Api::Requests::Wpf::Create
1028
+ ## WPF Reconcile
795
1029
  GenesisRuby::Api::Requests::Wpf::Reconcile
796
1030
 
1031
+ # Online Banking Payments
1032
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Bancomer
1033
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Bradesco
1034
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Davivienda
1035
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Itau
1036
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Pse
1037
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::RapiPago
1038
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Santander
1039
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Webpay
1040
+ # PayIn
1041
+ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::OnlineBanking::PayIn
1042
+
797
1043
  # References
798
1044
  GenesisRuby::Api::Requests::Financial::Capture
799
1045
  GenesisRuby::Api::Requests::Financial::Void
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.9
@@ -0,0 +1,45 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module CashPayments
7
+ # Company Types allowed values
8
+ class CompanyTypes
9
+
10
+ extend Api::Mixins::Constants::Common
11
+
12
+ # SA
13
+ SA = 0
14
+
15
+ # LTDA
16
+ LTDA = 1
17
+
18
+ # MEI
19
+ MEI = 2
20
+
21
+ # ME
22
+ ME = 3
23
+
24
+ # EIRELI
25
+ EIRELI = 4
26
+
27
+ # CONDOMINIUM
28
+ CONDOMINIUM = 5
29
+
30
+ # Closed
31
+ CLOSED = 6
32
+
33
+ # SIMPLE EIRELI
34
+ SIMPLE_EIRELI = 7
35
+
36
+ # OUTROS
37
+ OUTROS = 8
38
+
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,27 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module CashPayments
7
+ # Genders allowed values
8
+ class Genders
9
+
10
+ extend Mixins::Constants::Common
11
+
12
+ # Male
13
+ MALE = 0
14
+
15
+ # Female
16
+ FEMALE = 1
17
+
18
+ # Other
19
+ OTHER = 2
20
+
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,39 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module CashPayments
7
+ # Marital Statuses allowed values
8
+ class MaritalStatuses
9
+
10
+ extend Api::Mixins::Constants::Common
11
+
12
+ # Not Married
13
+ NOT_MARRIED = 0
14
+
15
+ # Married
16
+ MARRIED = 1
17
+
18
+ # Divorced
19
+ DIVORCED = 2
20
+
21
+ # Separate
22
+ SEPARATE = 3
23
+
24
+ # Widower
25
+ WIDOWER = 4
26
+
27
+ # Single
28
+ SINGLE = 5
29
+
30
+ # Other
31
+ OTHER = 6
32
+
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,29 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Mobile
7
+ module ApplePay
8
+ # Apple Pay Payment Subtypes allowed values
9
+ class PaymentSubtypes
10
+
11
+ extend Mixins::Constants::Common
12
+
13
+ # Apple Pay authorize payment subtype
14
+ AUTHORIZE = 'authorize'.freeze
15
+
16
+ # Apple Pay init_recurring_sale payment subtype
17
+ INIT_RECURRING_SALE = 'init_recurring_sale'.freeze
18
+
19
+ # Apple Pay sale payment subtype
20
+ SALE = 'sale'.freeze
21
+
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,29 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Mobile
7
+ module GooglePay
8
+ # Payment Subtype allowed values
9
+ class PaymentSubtypes
10
+
11
+ extend Mixins::Constants::Common
12
+
13
+ # Google Pay authorize payment subtype
14
+ AUTHORIZE = 'authorize'.freeze
15
+
16
+ # Google Pay init_recurring_sale payment subtype
17
+ INIT_RECURRING_SALE = 'init_recurring_sale'.freeze
18
+
19
+ # Google Pay sale payment subtype
20
+ SALE = 'sale'.freeze
21
+
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end