hypercharge-schema 1.24.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.travis.yml +6 -0
  4. data/CHANGELOG.md +3 -0
  5. data/Gemfile +7 -0
  6. data/Gemfile.lock +33 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +73 -0
  9. data/Rakefile +14 -0
  10. data/composer.json +17 -0
  11. data/hypercharge-schema.gemspec +27 -0
  12. data/json/MobilePayment.json +73 -0
  13. data/json/WpfPayment.json +99 -0
  14. data/json/authorize.json +77 -0
  15. data/json/authorize3d.json +173 -0
  16. data/json/capture.json +42 -0
  17. data/json/debit_sale.json +73 -0
  18. data/json/direct_pay24_sale.json +85 -0
  19. data/json/giro_pay_sale.json +85 -0
  20. data/json/ideal_sale.json +87 -0
  21. data/json/init_recurring_authorize.json +81 -0
  22. data/json/init_recurring_debit_authorize.json +77 -0
  23. data/json/init_recurring_debit_sale.json +77 -0
  24. data/json/init_recurring_sale.json +81 -0
  25. data/json/pay_in_advance.json +61 -0
  26. data/json/pay_pal.json +65 -0
  27. data/json/pay_safe_card_sale.json +69 -0
  28. data/json/payment_on_delivery.json +57 -0
  29. data/json/purchase_on_account.json +61 -0
  30. data/json/reconcile.json +20 -0
  31. data/json/recurring_debit_sale.json +45 -0
  32. data/json/recurring_sale.json +45 -0
  33. data/json/referenced_fund_transfer.json +46 -0
  34. data/json/refund.json +42 -0
  35. data/json/sale.json +77 -0
  36. data/json/sale3d.json +173 -0
  37. data/json/scheduler_create.json +46 -0
  38. data/json/scheduler_index.json +34 -0
  39. data/json/scheduler_update.json +35 -0
  40. data/json/types.json +385 -0
  41. data/json/void.json +33 -0
  42. data/lib/php/JsonSchemaFixture.php +12 -0
  43. data/lib/php/JsonSchemaValidator.php +47 -0
  44. data/lib/ruby/hypercharge/schema.rb +31 -0
  45. data/lib/ruby/hypercharge/schema/fixture.rb +30 -0
  46. data/lib/ruby/hypercharge/schema/version.rb +7 -0
  47. data/package.json +27 -0
  48. data/test/fixtures/notifications/PaymentNotification_echo.xml +4 -0
  49. data/test/fixtures/notifications/TransactionNotification_echo.xml +4 -0
  50. data/test/fixtures/notifications/recurring_event.json +13 -0
  51. data/test/fixtures/notifications/scheduler.json +7 -0
  52. data/test/fixtures/requests/MobilePayment.json +35 -0
  53. data/test/fixtures/requests/MobilePayment.xml +34 -0
  54. data/test/fixtures/requests/WpfPayment.json +40 -0
  55. data/test/fixtures/requests/WpfPayment.xml +39 -0
  56. data/test/fixtures/requests/WpfPayment_cancel.xml +4 -0
  57. data/test/fixtures/requests/WpfPayment_capture.xml +4 -0
  58. data/test/fixtures/requests/WpfPayment_refund.xml +4 -0
  59. data/test/fixtures/requests/WpfPayment_void.xml +4 -0
  60. data/test/fixtures/requests/authorize.json +29 -0
  61. data/test/fixtures/requests/authorize.xml +28 -0
  62. data/test/fixtures/requests/authorize3d_async.json +32 -0
  63. data/test/fixtures/requests/authorize3d_async.xml +31 -0
  64. data/test/fixtures/requests/authorize3d_sync.json +34 -0
  65. data/test/fixtures/requests/authorize3d_sync.xml +33 -0
  66. data/test/fixtures/requests/capture.json +10 -0
  67. data/test/fixtures/requests/capture.xml +9 -0
  68. data/test/fixtures/requests/debit_sale.json +28 -0
  69. data/test/fixtures/requests/debit_sale.xml +27 -0
  70. data/test/fixtures/requests/direct_pay24_sale.json +31 -0
  71. data/test/fixtures/requests/direct_pay24_sale.xml +30 -0
  72. data/test/fixtures/requests/giro_pay_sale.json +31 -0
  73. data/test/fixtures/requests/giro_pay_sale.xml +30 -0
  74. data/test/fixtures/requests/ideal_sale.json +31 -0
  75. data/test/fixtures/requests/ideal_sale.xml +30 -0
  76. data/test/fixtures/requests/init_recurring_authorize.json +34 -0
  77. data/test/fixtures/requests/init_recurring_authorize.xml +33 -0
  78. data/test/fixtures/requests/init_recurring_debit_authorize.json +33 -0
  79. data/test/fixtures/requests/init_recurring_debit_authorize.xml +32 -0
  80. data/test/fixtures/requests/init_recurring_debit_sale.json +34 -0
  81. data/test/fixtures/requests/init_recurring_debit_sale.xml +32 -0
  82. data/test/fixtures/requests/init_recurring_sale.json +34 -0
  83. data/test/fixtures/requests/init_recurring_sale.xml +33 -0
  84. data/test/fixtures/requests/init_recurring_sale_with_recurring_schedule.json +34 -0
  85. data/test/fixtures/requests/pay_in_advance.json +24 -0
  86. data/test/fixtures/requests/pay_in_advance.xml +23 -0
  87. data/test/fixtures/requests/pay_pal.json +23 -0
  88. data/test/fixtures/requests/pay_pal.xml +22 -0
  89. data/test/fixtures/requests/pay_safe_card_sale.json +23 -0
  90. data/test/fixtures/requests/pay_safe_card_sale.xml +23 -0
  91. data/test/fixtures/requests/payment_on_delivery.json +24 -0
  92. data/test/fixtures/requests/payment_on_delivery.xml +23 -0
  93. data/test/fixtures/requests/purchase_on_account.json +26 -0
  94. data/test/fixtures/requests/purchase_on_account.xml +23 -0
  95. data/test/fixtures/requests/reconcile.json +5 -0
  96. data/test/fixtures/requests/reconcile.xml +4 -0
  97. data/test/fixtures/requests/reconcile_by_date.json +7 -0
  98. data/test/fixtures/requests/reconcile_by_date.xml +6 -0
  99. data/test/fixtures/requests/recurring_debit_sale.json +11 -0
  100. data/test/fixtures/requests/recurring_debit_sale.xml +10 -0
  101. data/test/fixtures/requests/recurring_event.xml +4 -0
  102. data/test/fixtures/requests/recurring_sale.json +11 -0
  103. data/test/fixtures/requests/recurring_sale.xml +10 -0
  104. data/test/fixtures/requests/referenced_fund_transfer.json +11 -0
  105. data/test/fixtures/requests/referenced_fund_transfer.xml +10 -0
  106. data/test/fixtures/requests/refund.json +10 -0
  107. data/test/fixtures/requests/refund.xml +9 -0
  108. data/test/fixtures/requests/risk_params.json +10 -0
  109. data/test/fixtures/requests/risk_params.xml +9 -0
  110. data/test/fixtures/requests/sale.json +29 -0
  111. data/test/fixtures/requests/sale.xml +28 -0
  112. data/test/fixtures/requests/sale3d_async.json +32 -0
  113. data/test/fixtures/requests/sale3d_async.xml +31 -0
  114. data/test/fixtures/requests/sale3d_sync.json +34 -0
  115. data/test/fixtures/requests/sale3d_sync.xml +33 -0
  116. data/test/fixtures/requests/scheduler_create.json +9 -0
  117. data/test/fixtures/requests/scheduler_index_get_params.json +9 -0
  118. data/test/fixtures/requests/scheduler_update.json +8 -0
  119. data/test/fixtures/requests/void.json +8 -0
  120. data/test/fixtures/requests/void.xml +7 -0
  121. data/test/fixtures/responses/MobilePayment_new.json +20 -0
  122. data/test/fixtures/responses/MobilePayment_new.xml +19 -0
  123. data/test/fixtures/responses/PaymentNotification_echo.xml +4 -0
  124. data/test/fixtures/responses/PaymentTransactionNotification_echo.xml +4 -0
  125. data/test/fixtures/responses/WpfPayment_cancel.xml +13 -0
  126. data/test/fixtures/responses/WpfPayment_captured.xml +39 -0
  127. data/test/fixtures/responses/WpfPayment_error.json +8 -0
  128. data/test/fixtures/responses/WpfPayment_error.xml +7 -0
  129. data/test/fixtures/responses/WpfPayment_find.xml +39 -0
  130. data/test/fixtures/responses/WpfPayment_new.json +16 -0
  131. data/test/fixtures/responses/WpfPayment_new.xml +17 -0
  132. data/test/fixtures/responses/WpfPayment_refunded.xml +39 -0
  133. data/test/fixtures/responses/WpfPayment_voided.xml +39 -0
  134. data/test/fixtures/responses/authorize3d_pending_async.xml +15 -0
  135. data/test/fixtures/responses/authorize3d_sync.xml +14 -0
  136. data/test/fixtures/responses/authorize_approved.xml +14 -0
  137. data/test/fixtures/responses/authorize_error.json +16 -0
  138. data/test/fixtures/responses/authorize_error.xml +15 -0
  139. data/test/fixtures/responses/capture.xml +14 -0
  140. data/test/fixtures/responses/create_chargeback.xml +12 -0
  141. data/test/fixtures/responses/create_chargeback_reversal.xml +12 -0
  142. data/test/fixtures/responses/create_charged_debit_sale.xml +12 -0
  143. data/test/fixtures/responses/create_debit_chargeback.xml +12 -0
  144. data/test/fixtures/responses/create_deposit.xml +12 -0
  145. data/test/fixtures/responses/create_pre_arbitration.xml +12 -0
  146. data/test/fixtures/responses/create_rejected_debit_sale.xml +12 -0
  147. data/test/fixtures/responses/create_retrieval_request.xml +12 -0
  148. data/test/fixtures/responses/debit_sale.xml +12 -0
  149. data/test/fixtures/responses/direct_pay24_sale.xml +15 -0
  150. data/test/fixtures/responses/giro_pay_sale.xml +15 -0
  151. data/test/fixtures/responses/ideal_sale.xml +17 -0
  152. data/test/fixtures/responses/init_recurring_authorize.xml +14 -0
  153. data/test/fixtures/responses/init_recurring_debit_authorize.xml +17 -0
  154. data/test/fixtures/responses/init_recurring_debit_sale.xml +17 -0
  155. data/test/fixtures/responses/init_recurring_sale.xml +14 -0
  156. data/test/fixtures/responses/pay_in_advance.xml +17 -0
  157. data/test/fixtures/responses/pay_pal.xml +15 -0
  158. data/test/fixtures/responses/pay_safe_card_sale.xml +15 -0
  159. data/test/fixtures/responses/payment_on_delivery.xml +14 -0
  160. data/test/fixtures/responses/purchase_on_account.xml +18 -0
  161. data/test/fixtures/responses/reconcile_by_date_empty_result.xml +3 -0
  162. data/test/fixtures/responses/reconcile_by_date_page_1.xml +1293 -0
  163. data/test/fixtures/responses/reconcile_by_date_page_2.xml +1346 -0
  164. data/test/fixtures/responses/reconcile_by_date_page_3.xml +1394 -0
  165. data/test/fixtures/responses/reconcile_by_date_single_result.xml +16 -0
  166. data/test/fixtures/responses/recurring_debit_sale.xml +16 -0
  167. data/test/fixtures/responses/recurring_event.json +22 -0
  168. data/test/fixtures/responses/recurring_event.xml +21 -0
  169. data/test/fixtures/responses/recurring_sale.xml +14 -0
  170. data/test/fixtures/responses/referenced_fund_transfer.xml +14 -0
  171. data/test/fixtures/responses/refund.xml +14 -0
  172. data/test/fixtures/responses/sale.xml +12 -0
  173. data/test/fixtures/responses/sale3d_async.xml +15 -0
  174. data/test/fixtures/responses/sale3d_sync.xml +14 -0
  175. data/test/fixtures/responses/scheduled_transactions_empty.json +8 -0
  176. data/test/fixtures/responses/scheduled_transactions_one.json +22 -0
  177. data/test/fixtures/responses/scheduler.json +12 -0
  178. data/test/fixtures/responses/scheduler_empty_result.json +8 -0
  179. data/test/fixtures/responses/scheduler_error.json +7 -0
  180. data/test/fixtures/responses/scheduler_next.json +4 -0
  181. data/test/fixtures/responses/scheduler_page_1.json +93 -0
  182. data/test/fixtures/responses/scheduler_page_2.json +45 -0
  183. data/test/fixtures/responses/scheduler_single_result.json +21 -0
  184. data/test/fixtures/responses/void.xml +12 -0
  185. data/test/js/mobile_payment_test.js +287 -0
  186. data/test/php/all.php +9 -0
  187. data/test/php/authorize3d_test.php +546 -0
  188. data/test/php/authorize_test.php +546 -0
  189. data/test/php/capture_test.php +241 -0
  190. data/test/php/json_schema_validator_test.php +24 -0
  191. data/test/php/mobile_payment_test.php +238 -0
  192. data/test/php/reconcile_test.php +21 -0
  193. data/test/php/referenced_fund_transfer_test.php +183 -0
  194. data/test/php/refund_test.php +237 -0
  195. data/test/php/sale_test.php +546 -0
  196. data/test/php/test_helper.php +29 -0
  197. data/test/php/void_test.php +163 -0
  198. data/test/php/wpf_payment_test.php +19 -0
  199. data/test/ruby/authorize3d_async_spec.rb +29 -0
  200. data/test/ruby/authorize3d_sync_spec.rb +27 -0
  201. data/test/ruby/authorize_spec.rb +25 -0
  202. data/test/ruby/capture_spec.rb +16 -0
  203. data/test/ruby/debit_sale_spec.rb +26 -0
  204. data/test/ruby/direct_pay24_sale_spec.rb +30 -0
  205. data/test/ruby/giro_pay_sale_spec.rb +30 -0
  206. data/test/ruby/ideal_sale_spec.rb +29 -0
  207. data/test/ruby/init_recurring_authorize_spec.rb +26 -0
  208. data/test/ruby/init_recurring_debit_authorize_spec.rb +27 -0
  209. data/test/ruby/init_recurring_debit_sale_spec.rb +27 -0
  210. data/test/ruby/init_recurring_sale_spec.rb +26 -0
  211. data/test/ruby/mobile_payment_spec.rb +22 -0
  212. data/test/ruby/pay_in_advance_spec.rb +23 -0
  213. data/test/ruby/pay_pal_spec.rb +25 -0
  214. data/test/ruby/pay_safe_card_sale_spec.rb +24 -0
  215. data/test/ruby/payment_on_delivery_spec.rb +21 -0
  216. data/test/ruby/purchase_on_account_spec.rb +23 -0
  217. data/test/ruby/reconcile_spec.rb +11 -0
  218. data/test/ruby/recurring_debit_sale_spec.rb +17 -0
  219. data/test/ruby/recurring_sale_spec.rb +17 -0
  220. data/test/ruby/referenced_fund_transfer_spec.rb +17 -0
  221. data/test/ruby/refund_spec.rb +16 -0
  222. data/test/ruby/sale3d_async_spec.rb +29 -0
  223. data/test/ruby/sale3d_sync_spec.rb +27 -0
  224. data/test/ruby/sale_spec.rb +25 -0
  225. data/test/ruby/scheduler_spec.rb +43 -0
  226. data/test/ruby/test_helper.rb +74 -0
  227. data/test/ruby/types_specs.rb +1494 -0
  228. data/test/ruby/void_spec.rb +14 -0
  229. data/test/ruby/wpf_payment_spec.rb +27 -0
  230. metadata +527 -0
@@ -0,0 +1,77 @@
1
+ {
2
+ "description" : "Hypercharge sale Transaction request",
3
+ "type":"object",
4
+ "$schema": "http://json-schema.org/draft-03/schema",
5
+ "additionalProperties":false,
6
+ "properties": {
7
+ "payment_transaction": {
8
+ "type":"object",
9
+ "required":true,
10
+ "additionalProperties":false,
11
+ "properties": {
12
+ "transaction_type": {
13
+ "description": "Type of the Transaction => static 'sale'",
14
+ "required":true,
15
+ "type" : "string",
16
+ "pattern" : "^sale$"
17
+ },
18
+ "transaction_id": {
19
+ "required":true,
20
+ "extends" : "types.json#/transaction_id"
21
+ },
22
+ "usage": {
23
+ "required":false,
24
+ "extends" : "types.json#/usage"
25
+ },
26
+ "remote_ip": {
27
+ "required":true,
28
+ "extends": "types.json#/ipv4"
29
+ },
30
+ "amount": {
31
+ "required":true,
32
+ "extends" : "types.json#/amount"
33
+ },
34
+ "currency": {
35
+ "required":true,
36
+ "extends" : "types.json#/currency"
37
+ },
38
+ "card_holder": {
39
+ "required":true,
40
+ "extends" : "types.json#/card_holder"
41
+ },
42
+ "expiration_month" : {
43
+ "required":true,
44
+ "extends" : "types.json#/expiration_month"
45
+ },
46
+ "expiration_year": {
47
+ "required":true,
48
+ "extends" : "types.json#/expiration_year"
49
+ },
50
+ "customer_email": {
51
+ "required":true,
52
+ "extends" : "types.json#/customer_email"
53
+ },
54
+ "customer_phone" : {
55
+ "required":false,
56
+ "extends" : "types.json#/customer_phone"
57
+ },
58
+ "card_number" : {
59
+ "required":true,
60
+ "extends" : "types.json#/card_number"
61
+ },
62
+ "cvv" : {
63
+ "required":false,
64
+ "extends" : "types.json#/cvv"
65
+ },
66
+ "billing_address": {
67
+ "required": true,
68
+ "extends": "types.json#/address"
69
+ },
70
+ "risk_params" : {
71
+ "required": false,
72
+ "extends": "types.json#/risk_params"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,173 @@
1
+ {
2
+ "description":"Hypercharge sale3d Transaction request",
3
+ "type":[
4
+ {
5
+ "type":"object",
6
+ "$schema":"http://json-schema.org/draft-03/schema",
7
+ "additionalProperties":false,
8
+ "properties":{
9
+ "payment_transaction":{
10
+ "type":"object",
11
+ "required":true,
12
+ "additionalProperties":false,
13
+ "properties":{
14
+ "transaction_type":{
15
+ "description":"Type of the Transaction => static 'sale3d'",
16
+ "required":true,
17
+ "type":"string",
18
+ "pattern":"^sale3d$"
19
+ },
20
+ "transaction_id":{
21
+ "required":true,
22
+ "extends":"types.json#/transaction_id"
23
+ },
24
+ "usage":{
25
+ "required":false,
26
+ "extends":"types.json#/usage"
27
+ },
28
+ "remote_ip":{
29
+ "required":true,
30
+ "extends":"types.json#/ipv4"
31
+ },
32
+ "amount":{
33
+ "required":true,
34
+ "extends":"types.json#/amount"
35
+ },
36
+ "currency":{
37
+ "required":true,
38
+ "extends":"types.json#/currency"
39
+ },
40
+ "card_holder":{
41
+ "required":true,
42
+ "extends":"types.json#/card_holder"
43
+ },
44
+ "expiration_month":{
45
+ "required":true,
46
+ "extends":"types.json#/expiration_month"
47
+ },
48
+ "expiration_year":{
49
+ "required":true,
50
+ "extends":"types.json#/expiration_year"
51
+ },
52
+ "customer_email":{
53
+ "required":true,
54
+ "extends":"types.json#/customer_email"
55
+ },
56
+ "customer_phone":{
57
+ "required":false,
58
+ "extends":"types.json#/customer_phone"
59
+ },
60
+ "card_number":{
61
+ "required":true,
62
+ "extends":"types.json#/card_number"
63
+ },
64
+ "cvv":{
65
+ "required":false,
66
+ "extends":"types.json#/cvv"
67
+ },
68
+ "billing_address":{
69
+ "required":true,
70
+ "extends":"types.json#/address"
71
+ },
72
+ "risk_params":{
73
+ "required":false,
74
+ "extends":"types.json#/risk_params"
75
+ },
76
+ "notification_url":{
77
+ "required":true,
78
+ "extends":"types.json#/url"
79
+ },
80
+ "return_success_url":{
81
+ "required":true,
82
+ "extends":"types.json#/url"
83
+ },
84
+ "return_failure_url":{
85
+ "required":true,
86
+ "extends":"types.json#/url"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ },
92
+ {
93
+ "type":"object",
94
+ "$schema":"http://json-schema.org/draft-03/schema",
95
+ "additionalProperties":false,
96
+ "properties":{
97
+ "payment_transaction":{
98
+ "type":"object",
99
+ "required":true,
100
+ "additionalProperties":false,
101
+ "properties":{
102
+ "transaction_type":{
103
+ "description":"Type of the Transaction => static 'sale3d'",
104
+ "required":true,
105
+ "type":"string",
106
+ "pattern":"^sale3d$"
107
+ },
108
+ "transaction_id":{
109
+ "required":true,
110
+ "extends":"types.json#/transaction_id"
111
+ },
112
+ "usage":{
113
+ "required":false,
114
+ "extends":"types.json#/usage"
115
+ },
116
+ "remote_ip":{
117
+ "required":true,
118
+ "extends":"types.json#/ipv4"
119
+ },
120
+ "amount":{
121
+ "required":true,
122
+ "extends":"types.json#/amount"
123
+ },
124
+ "currency":{
125
+ "required":true,
126
+ "extends":"types.json#/currency"
127
+ },
128
+ "card_holder":{
129
+ "required":true,
130
+ "extends":"types.json#/card_holder"
131
+ },
132
+ "expiration_month":{
133
+ "required":true,
134
+ "extends":"types.json#/expiration_month"
135
+ },
136
+ "expiration_year":{
137
+ "required":true,
138
+ "extends":"types.json#/expiration_year"
139
+ },
140
+ "customer_email":{
141
+ "required":true,
142
+ "extends":"types.json#/customer_email"
143
+ },
144
+ "customer_phone":{
145
+ "required":false,
146
+ "extends":"types.json#/customer_phone"
147
+ },
148
+ "card_number":{
149
+ "required":true,
150
+ "extends":"types.json#/card_number"
151
+ },
152
+ "cvv":{
153
+ "required":false,
154
+ "extends":"types.json#/cvv"
155
+ },
156
+ "billing_address":{
157
+ "required":true,
158
+ "extends":"types.json#/address"
159
+ },
160
+ "risk_params":{
161
+ "required":false,
162
+ "extends":"types.json#/risk_params"
163
+ },
164
+ "mpi_params":{
165
+ "required":true,
166
+ "extends":"types.json#/mpi_params"
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
172
+ ]
173
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "description" : "Hypercharge RecurringSchedule create request",
3
+ "type":"object",
4
+ "$schema": "http://json-schema.org/draft-03/schema",
5
+ "additionalProperties":false,
6
+ "properties": {
7
+ "payment_transaction_unique_id": {
8
+ "description": "The Transaction to create the RecurringSchedule for. The Transaction type must be init_recurring_authorize, init_recurring_sale, init_recurring_debit_sale or init_recurring_debit_authorize",
9
+ "required":true,
10
+ "extends" : "types.json#/unique_id"
11
+ },
12
+ "amount": {
13
+ "description" : "Amount of the payment in cents, must be > 0",
14
+ "required":true,
15
+ "extends" : "types.json#/amount"
16
+ },
17
+ "start_date": {
18
+ "description":"Start date to begin with scheduling transactions",
19
+ "required":true,
20
+ "extends" : "types.json#/date"
21
+ },
22
+ "end_date": {
23
+ "description":"End date to stop with scheduling transactions",
24
+ "extends" : "types.json#/date"
25
+ },
26
+ "interval" : {
27
+ "required":true,
28
+ "extends" : "types.json#/recurring_schedule/properties/interval"
29
+ },
30
+ "max_retries": {
31
+ "extends" : "types.json#/recurring_schedule/properties/max_retries"
32
+ },
33
+ "expiring_notification_time": {
34
+ "description": "hypercharge sends merchant a notification x Days before end_date",
35
+ "type" : "integer",
36
+ "minimum": 1,
37
+ "maximum": 100,
38
+ "exclusiveMinimum": false,
39
+ "exclusiveMaximum": false
40
+ },
41
+ "active":{
42
+ "description": "true: Scheduler is on. false: Scheduler is turned off but still visible.",
43
+ "extends" : "types.json#/boolean"
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "description" : "Hypercharge get params for GET /v2/scheduler",
3
+ "type":"object",
4
+ "$schema": "http://json-schema.org/draft-03/schema",
5
+ "additionalProperties":false,
6
+ "properties": {
7
+ "page": {
8
+ "extends" : "types.json#/page"
9
+ },
10
+ "per_page": {
11
+ "extends" : "types.json#/per_page"
12
+ },
13
+ "start_date_from": {
14
+ "description": "schedulers where start_date >= start_date_from",
15
+ "extends" : "types.json#/date"
16
+ },
17
+ "start_date_to": {
18
+ "description": "schedulers where start_date <= start_date_to",
19
+ "extends" : "types.json#/date"
20
+ },
21
+ "end_date_from": {
22
+ "description": "schedulers where end_date >= end_date_from",
23
+ "extends" : "types.json#/date"
24
+ },
25
+ "end_date_to": {
26
+ "description": "schedulers where end_date <= end_date_to",
27
+ "extends" : "types.json#/date"
28
+ },
29
+ "active":{
30
+ "description": "schedulers where active = true|false; true: Scheduler is on. false: Scheduler is turned off but still visible.",
31
+ "extends" : "types.json#/boolean"
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "description" : "Hypercharge RecurringSchedule update request",
3
+ "type":"object",
4
+ "$schema": "http://json-schema.org/draft-03/schema",
5
+ "additionalProperties":false,
6
+ "properties": {
7
+ "amount": {
8
+ "extends" : "types.json#/amount"
9
+ },
10
+ "start_date": {
11
+ "extends" : "types.json#/date"
12
+ },
13
+ "end_date": {
14
+ "extends" : "types.json#/date"
15
+ },
16
+ "interval" : {
17
+ "extends" : "types.json#/recurring_schedule/properties/interval"
18
+ },
19
+ "max_retries": {
20
+ "extends" : "types.json#/recurring_schedule/properties/max_retries"
21
+ },
22
+ "expiring_notification_time": {
23
+ "description": "hypercharge sends merchant a notification x Days before end_date",
24
+ "type" : "integer",
25
+ "minimum": 1,
26
+ "maximum": 100,
27
+ "exclusiveMinimum": false,
28
+ "exclusiveMaximum": false
29
+ },
30
+ "active":{
31
+ "description": "true: Scheduler is on. false: Scheduler is turned off but still visible.",
32
+ "extends" : "types.json#/boolean"
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,385 @@
1
+ {
2
+ "description" : "Hypercharge API types",
3
+ "type":"object",
4
+ "unique_id": {
5
+ "description": "id generated by Hypercharge",
6
+ "type": "string",
7
+ "pattern" : "^[a-f0-9]{32}$"
8
+ },
9
+ "reference_id": {
10
+ "description": "references an other transaction. contains the foreign unique_id",
11
+ "type": "string",
12
+ "pattern" : "^[a-f0-9]{32}$"
13
+ },
14
+ "amount": {
15
+ "description" : "Amount of the payment in cents, must be > 0",
16
+ "type" : "integer",
17
+ "minimum": 1,
18
+ "exclusiveMinimum": false
19
+ },
20
+ "currency": {
21
+ "description" : "Currency code in ISO 4217 (http://www.xe.com/iso4217.php)",
22
+ "type" : "string",
23
+ "enum" : ["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZM",
24
+ "AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD",
25
+ "BTN","BWP","BYR","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","RSD",
26
+ "CUP","CVE","CYP","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB",
27
+ "EUR","FJD","FKP","GBP","GEL","GGP","GHC","GHS","GIP","GMD","GNF","GTQ",
28
+ "GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR",
29
+ "ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD",
30
+ "KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL",
31
+ "MGA","MKD","MMK","MNT","MOP","MRO","MTL","MUR","MVR","MWK","MXN","MYR",
32
+ "MZM","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK",
33
+ "PHP","PKR","PLN","PYG","QAR","ROL","RON","RUB","RWF","SAR","SBD","SCR",
34
+ "SDD","SDG","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SPL","SRD","STD",
35
+ "SVC","SYP","SZL","THB","TJS","TMM","TND","TOP","TRY","TTD","TVD","TWD",
36
+ "TZS","UAH","UGX","USD","UYU","UZS","VEB","VND","VUV","WST","XAF","XAG",
37
+ "XAU","XCD","XDR","XOF","XPD","XPF","YER","ZAR","ZMK","ZWD"]
38
+ },
39
+ "transaction_id": {
40
+ "description" : "unique merchant generated transaction_id",
41
+ "type" : "string",
42
+ "pattern" : "^[\\w\\s_\\-\\.]{1,255}$"
43
+ },
44
+ "usage": {
45
+ "description" : "statement, as it appears in the customer’s bank statement",
46
+ "type" : "string",
47
+ "minLength": 1,
48
+ "maxLength": 255
49
+ },
50
+ "customer_email": {
51
+ "description" : "the customer’s e-mail address",
52
+ "type" : "string",
53
+ "pattern": "^([^@\\s]+)@((?:[-a-zA-Z0-9]+\\.)+[a-zA-Z]{2,})$"
54
+ },
55
+ "customer_phone" : {
56
+ "description" : "the customer’s phone number",
57
+ "type" : "string",
58
+ "minLength": 1,
59
+ "maxLength": 255
60
+ },
61
+ "url" : {
62
+ "description" : "a valid url",
63
+ "type" : "string",
64
+ "pattern": "^http(s)?.{4,}"
65
+ },
66
+ "ipv4" : {
67
+ "description" : "a valid IPv4 address",
68
+ "type" : "string",
69
+ "pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$"
70
+ },
71
+ "card_holder": {
72
+ "description" : "Full name of customer as printed on credit card (first name and last name at least)",
73
+ "type" : "string",
74
+ "minLength": 1,
75
+ "maxLength": 255
76
+ },
77
+ "expiration_month": {
78
+ "description" : "Expiration month as printed on credit card. format MM",
79
+ "type" : "string",
80
+ "pattern": "^(0?[1-9]|1[0-2])$"
81
+ },
82
+ "expiration_year": {
83
+ "description" : "Expiration year as printed on credit card. format YYYY",
84
+ "type" : "string",
85
+ "pattern": "^20\\d\\d$"
86
+ },
87
+ "card_number" : {
88
+ "description" : "complete cc number of customer. 13 to 16 digits",
89
+ "type" : "string",
90
+ "pattern": "^\\d{13,16}$"
91
+ },
92
+ "cvv" : {
93
+ "description" : "cvv of cc. 3 to 4 digits",
94
+ "type" : "string",
95
+ "pattern": "^\\d{3,4}$"
96
+ },
97
+
98
+ "wire_reference_id" : {
99
+ "description" : "Wire reference id for the transaction to show up on the bank statement",
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "maxLength": 10
103
+ },
104
+ "bank_account_holder" : {
105
+ "description" : "name of the bank account holder",
106
+ "type": "string",
107
+ "minLength": 1,
108
+ "maxLength": 255
109
+ },
110
+ "bank_account_number" : {
111
+ "description" : "customers bank account number",
112
+ "type": "string",
113
+ "minLength": 1,
114
+ "maxLength": 16
115
+ },
116
+ "bank_number" : {
117
+ "description" : "customers bank number",
118
+ "type": "string",
119
+ "minLength": 1,
120
+ "maxLength": 16
121
+ },
122
+ "bank_name" : {
123
+ "description": "Banknames for IdealSale",
124
+ "type" : "string",
125
+ "enum": ["ABN_AMRO", "POSTBANK", "RABOBANK", "FORTIS", "FORTIS_TEST", "SNS_BANK"]
126
+ },
127
+ "date": {
128
+ "description":"Date of format 'YYYY-MM-DD' e.g. '2014-05-24'",
129
+ "type":"string",
130
+ "pattern":"^20\\d{2}-(0|1)\\d-(0|1|2|3)\\d$"
131
+ },
132
+
133
+ "address": {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "properties" : {
137
+ "first_name" : {
138
+ "description" : "the customers first name",
139
+ "type" : "string",
140
+ "required": true,
141
+ "minLength": 1,
142
+ "maxLength": 255
143
+ },
144
+ "last_name" : {
145
+ "description" : "the customers first name",
146
+ "type" : "string",
147
+ "required": true,
148
+ "minLength": 1,
149
+ "maxLength": 255
150
+ },
151
+ "address1" : {
152
+ "description" : "first line of address",
153
+ "type" : "string",
154
+ "required": true,
155
+ "minLength": 1,
156
+ "maxLength": 255
157
+ },
158
+ "address2" : {
159
+ "description" : "second line of address",
160
+ "type" : "string",
161
+ "minLength": 1,
162
+ "maxLength": 255
163
+ },
164
+ "city" : {
165
+ "description" : "the customers city",
166
+ "type" : "string",
167
+ "required": true,
168
+ "minLength": 1,
169
+ "maxLength": 255
170
+ },
171
+ "zip_code" : {
172
+ "description" : "the customers city",
173
+ "type" : "string",
174
+ "required": true,
175
+ "minLength": 1,
176
+ "maxLength": 32
177
+ },
178
+ "state" : {
179
+ "required": false,
180
+ "description" : "state code in ISO 3166-2, only needed for USA and Canada",
181
+ "type" : "string",
182
+ "enum": ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO",
183
+ "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL",
184
+ "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO",
185
+ "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY",
186
+ "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX",
187
+ "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY", "AB", "BC", "MB",
188
+ "NB", "NF", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT"]
189
+ },
190
+ "country": {
191
+ "required": true,
192
+ "description" : "country code in ISO 3166-1 (alpha-2), http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2",
193
+ "type" : "string",
194
+ "enum": ["FR", "SA", "CI", "KZ", "LC", "IE", "AE", "TW", "ES", "EH",
195
+ "MY", "BJ", "PW", "JP", "GR", "PL", "MN", "PA", "MC", "SM", "IQ",
196
+ "SB", "CU", "OM", "UA", "ET", "KP", "AF", "HR", "NC", "KE", "TM",
197
+ "QA", "MZ", "PM", "MO", "SY", "MD", "SN", "GH", "DJ", "CV", "IR",
198
+ "VA", "SC", "RO", "FI", "NZ", "CK", "AR", "BW", "NO", "AG", "TN",
199
+ "PY", "MP", "BA", "SZ", "GT", "TC", "PN", "SO", "GI", "DK", "UY",
200
+ "IS", "SD", "FJ", "CL", "AS", "KR", "TZ", "HT", "RE", "NP", "CA",
201
+ "BM", "NE", "KG", "TO", "GU", "TD", "MQ", "BB", "VN", "IT", "VC",
202
+ "SE", "LR", "UZ", "CM", "AT", "FK", "ZW", "HU", "BY", "AI", "BN",
203
+ "NF", "KH", "MR", "ZA", "MG", "DM", "PE", "CY", "LS", "CN", "AU",
204
+ "BZ", "NR", "ZM", "KI", "HK", "BO", "NG", "MS", "BD", "GW", "SR",
205
+ "GL", "PF", "MH", "LT", "VE", "SG", "GA", "CZ", "FM", "CO", "LI",
206
+ "CD", "TR", "TG", "DZ", "PR", "EC", "MT", "BE", "DO", "PG", "GM",
207
+ "SH", "GB", "LU", "AW", "IL", "UG", "AL", "NI", "GY", "TH", "MU",
208
+ "BF", "WF", "ST", "GN", "PH", "YE", "SI", "DE", "LV", "VG", "LK",
209
+ "US", "RU", "FO", "NU", "CF", "KW", "AM", "TT", "HN", "BR", "EE",
210
+ "MV", "BG", "PT", "JM", "MK", "SJ", "GD", "CR", "IN", "CG", "AN",
211
+ "LA", "BS", "WS", "KM", "BH", "TJ", "MW", "ML", "SV", "GP", "MA",
212
+ "VI", "SK", "GE", "AZ", "RW", "ID", "CH", "KY", "AO", "LB", "BT",
213
+ "NL", "KN", "AD", "TV", "ER", "TK", "EG", "MX", "BI", "NA", "MM",
214
+ "VU", "JO", "GQ", "PK", "SL", "GF", "LY"]
215
+ }
216
+ }
217
+ },
218
+ "expires_in": {
219
+ "description" : "The acceptable ”time-to-live” in seconds between the merchant’s creation of a payment and the customer’s interaction. This can be set to anything between 5 minutes and 24 hours",
220
+ "type" : "integer",
221
+ "minimum": 300,
222
+ "maximum": 86400,
223
+ "exclusiveMinimum": false,
224
+ "exclusiveMaximum": false
225
+ },
226
+ "retries": {
227
+ "description" : "The acceptable payment retries for the customers if a transaction failed.",
228
+ "type" : "integer",
229
+ "minimum": 1,
230
+ "exclusiveMinimum": false
231
+ },
232
+ "risk_params" : {
233
+ "description" : "set of risk params as described in the Advanced risk management with RiskParams section",
234
+ "type" : "object",
235
+ "additionalProperties": false,
236
+ "properties":{
237
+ "ssn":{
238
+ "type": ["string", "number"],
239
+ "minLength": 1,
240
+ "maxLength": 128
241
+ },
242
+ "mac_address":{
243
+ "type": "string",
244
+ "minLength": 1,
245
+ "maxLength": 128
246
+ },
247
+ "session_id":{
248
+ "type": ["string", "number"],
249
+ "minLength": 1,
250
+ "maxLength": 128
251
+ },
252
+ "user_id":{
253
+ "type": ["string", "number"],
254
+ "minLength": 1,
255
+ "maxLength": 128
256
+ },
257
+ "user_level":{
258
+ "type": ["string", "number"],
259
+ "minLength": 1,
260
+ "maxLength": 128
261
+ },
262
+ "email":{
263
+ "type": "string",
264
+ "minLength": 1,
265
+ "maxLength": 128
266
+ },
267
+ "phone":{
268
+ "type": ["string", "number"],
269
+ "minLength": 1,
270
+ "maxLength": 128
271
+ },
272
+ "remote_ip":{
273
+ "type": "string",
274
+ "minLength": 1,
275
+ "maxLength": 128
276
+ },
277
+ "serial_number":{
278
+ "type": ["string", "number"],
279
+ "minLength": 1,
280
+ "maxLength": 128
281
+ },
282
+ "infocapture_token":{
283
+ "type": "string",
284
+ "minLength": 1,
285
+ "maxLength": 128
286
+ }
287
+ }
288
+ },
289
+ "recurring_schedule":{
290
+ "description":"Recurring Schedule",
291
+ "type":"object",
292
+ "$schema":"http://json-schema.org/draft-03/schema",
293
+ "additionalProperties":false,
294
+ "properties":{
295
+ "start_date":{
296
+ "description":"Start date to begin with recurring",
297
+ "required":true,
298
+ "extends": "#/date"
299
+ },
300
+ "end_date":{
301
+ "description":"End date to stop the recurring schedule",
302
+ "extends": "#/date"
303
+ },
304
+ "amount":{
305
+ "required":true,
306
+ "extends": "#/amount"
307
+ },
308
+ "interval":{
309
+ "description": "recurring interval. must be one of weekly, monthly, anually",
310
+ "required" : true,
311
+ "type" : "string",
312
+ "enum": ["weekly", "monthly", "anually"]
313
+ },
314
+ "max_retries":{
315
+ "description" : "number of times to retry the rebilling before giving up",
316
+ "type" : "integer",
317
+ "minimum": 0,
318
+ "maximum": 10,
319
+ "exclusiveMinimum": false,
320
+ "exclusiveMaximum": false
321
+ }
322
+ }
323
+ },
324
+ "mpi_params": {
325
+ "description": "required if an authorize3d or sale3d transaction should be handled synchronous",
326
+ "type":"object",
327
+ "required":true,
328
+ "additionalProperties": false,
329
+ "properties": {
330
+ "cavv":{
331
+ "description": "Verification Id of the authentication. Please note this can be the CAVV for Visa Card or UCAF to identify MasterCard",
332
+ "type": "string",
333
+ "required":true,
334
+ "minLength": 1,
335
+ "maxLength": 255
336
+ },
337
+ "eci":{
338
+ "description": "Electric Commerce Indicator as retured from the MPI.",
339
+ "type": "string",
340
+ "required":true,
341
+ "minLength": 1,
342
+ "maxLength": 255
343
+ },
344
+ "xid":{
345
+ "description": "Transaction ID generated by the 3D Secure service that uniquely identifies a 3D Secure check request",
346
+ "type": "string",
347
+ "required":true,
348
+ "minLength": 1,
349
+ "maxLength": 255
350
+ }
351
+ }
352
+ },
353
+ "transaction_types": {
354
+ "description" : "For WpfPayment and MobilePayment. The transaction types that the merchant is willing to accept payments for",
355
+ "type" : "array",
356
+ "minItems": 1,
357
+ "items": {
358
+ "enum" : ["authorize", "authorize3d", "sale", "sale3d", "init_recurring_sale",
359
+ "ideal_sale", "debit_sale", "sepa_debit", "direct_pay24_sale",
360
+ "giro_pay_sale", "pay_safe_card_sale", "init_recurring_authorize",
361
+ "purchase_on_account", "pay_in_advance", "deposit", "payment_on_delivery",
362
+ "pay_pal", "init_recurring_debit_sale", "init_recurring_debit_authorize",
363
+ "recurring_debit_sale", "barzahlen_sale"]
364
+ }
365
+ },
366
+ "page": {
367
+ "description": "pagination: the result set page to show",
368
+ "type": "integer",
369
+ "minimum":1,
370
+ "maximum": 100000,
371
+ "exclusiveMinimum": false,
372
+ "exclusiveMaximum": false
373
+ },
374
+ "per_page": {
375
+ "description" : "pagination: the count of entries per page",
376
+ "type": "integer",
377
+ "minimum":1,
378
+ "maximum": 1000,
379
+ "exclusiveMinimum": false,
380
+ "exclusiveMaximum": false
381
+ },
382
+ "boolean": {
383
+ "enum": [true, false, 0, 1]
384
+ }
385
+ }