citypay_api_client 1.0.3 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +111 -39
  3. data/citypay_api_client.gemspec +5 -5
  4. data/docs/AccountCreate.md +10 -9
  5. data/docs/AccountStatus.md +8 -7
  6. data/docs/Acknowledgement.md +14 -13
  7. data/docs/AclCheckRequest.md +18 -0
  8. data/docs/AclCheckResponseModel.md +24 -0
  9. data/docs/AirlineAdvice.md +38 -37
  10. data/docs/AirlineSegment.md +22 -21
  11. data/docs/AuthReference.md +34 -33
  12. data/docs/AuthReferences.md +8 -7
  13. data/docs/AuthRequest.md +52 -49
  14. data/docs/AuthResponse.md +64 -59
  15. data/docs/AuthenRequired.md +12 -11
  16. data/docs/AuthorisationAndPaymentApi.md +850 -0
  17. data/docs/Batch.md +22 -0
  18. data/docs/BatchProcessingApi.md +218 -0
  19. data/docs/BatchReportRequest.md +20 -0
  20. data/docs/BatchReportResponseModel.md +28 -0
  21. data/docs/BatchTransaction.md +24 -0
  22. data/docs/BatchTransactionResultModel.md +44 -0
  23. data/docs/Bin.md +34 -0
  24. data/docs/BinLookup.md +18 -0
  25. data/docs/CResAuthRequest.md +8 -7
  26. data/docs/CaptureRequest.md +18 -17
  27. data/docs/Card.md +46 -41
  28. data/docs/CardHolderAccount.md +24 -21
  29. data/docs/CardHolderAccountApi.md +387 -111
  30. data/docs/CardStatus.md +10 -9
  31. data/docs/ChargeRequest.md +38 -31
  32. data/docs/CheckBatchStatus.md +20 -0
  33. data/docs/CheckBatchStatusResponse.md +18 -0
  34. data/docs/ContactDetails.md +32 -31
  35. data/docs/Decision.md +12 -11
  36. data/docs/DirectPostApi.md +389 -0
  37. data/docs/DirectPostRequest.md +60 -0
  38. data/docs/DirectTokenAuthRequest.md +24 -0
  39. data/docs/DomainKeyCheckRequest.md +18 -0
  40. data/docs/DomainKeyRequest.md +22 -0
  41. data/docs/DomainKeyResponse.md +26 -0
  42. data/docs/Error.md +16 -13
  43. data/docs/EventDataModel.md +26 -0
  44. data/docs/Exists.md +22 -0
  45. data/docs/ExternalMPI.md +16 -15
  46. data/docs/ListMerchantsResponse.md +12 -11
  47. data/docs/MCC6012.md +14 -13
  48. data/docs/Merchant.md +16 -15
  49. data/docs/OperationalFunctionsApi.md +375 -0
  50. data/docs/PaResAuthRequest.md +10 -9
  51. data/docs/PaylinkAddress.md +30 -0
  52. data/docs/PaylinkAdjustmentRequest.md +22 -0
  53. data/docs/PaylinkApi.md +806 -0
  54. data/docs/PaylinkAttachmentRequest.md +26 -0
  55. data/docs/PaylinkAttachmentResult.md +22 -0
  56. data/docs/PaylinkBillPaymentTokenRequest.md +32 -0
  57. data/docs/PaylinkCardHolder.md +36 -0
  58. data/docs/PaylinkCart.md +30 -0
  59. data/docs/PaylinkCartItemModel.md +32 -0
  60. data/docs/PaylinkConfig.md +60 -0
  61. data/docs/PaylinkCustomParam.md +38 -0
  62. data/docs/PaylinkEmailNotificationPath.md +26 -0
  63. data/docs/PaylinkErrorCode.md +20 -0
  64. data/docs/PaylinkFieldGuardModel.md +30 -0
  65. data/docs/PaylinkPartPayments.md +28 -0
  66. data/docs/PaylinkSMSNotificationPath.md +20 -0
  67. data/docs/PaylinkStateEvent.md +22 -0
  68. data/docs/PaylinkTokenCreated.md +44 -0
  69. data/docs/PaylinkTokenRequestModel.md +42 -0
  70. data/docs/PaylinkTokenStatus.md +72 -0
  71. data/docs/PaylinkTokenStatusChangeRequest.md +26 -0
  72. data/docs/PaylinkTokenStatusChangeResponse.md +20 -0
  73. data/docs/PaylinkUI.md +24 -0
  74. data/docs/Ping.md +8 -7
  75. data/docs/ProcessBatchRequest.md +24 -0
  76. data/docs/ProcessBatchResponse.md +20 -0
  77. data/docs/RefundRequest.md +26 -0
  78. data/docs/RegisterCard.md +16 -13
  79. data/docs/RequestChallenged.md +16 -15
  80. data/docs/RetrieveRequest.md +12 -11
  81. data/docs/ThreeDSecure.md +32 -15
  82. data/docs/TokenisationResponseModel.md +36 -0
  83. data/docs/VoidRequest.md +12 -13
  84. data/docs/images/3dsv1-challenge.png +0 -0
  85. data/docs/images/3dsv2-challenge.png +0 -0
  86. data/docs/images/3dsv2-frictionless.png +0 -0
  87. data/docs/images/3dsv2-method-challenge.png +0 -0
  88. data/docs/images/3dsv2-method-frictionless.png +0 -0
  89. data/docs/images/3dsv2-no3d.png +0 -0
  90. data/docs/images/citypay-logo.svg +1 -0
  91. data/docs/images/direct-post-flow.png +0 -0
  92. data/docs/images/favicon.ico +0 -0
  93. data/docs/images/header.png +0 -0
  94. data/docs/images/logo.ai +1913 -4
  95. data/docs/images/logo.png +0 -0
  96. data/docs/images/logo.svg +1 -0
  97. data/docs/images/merchant-BPS-workflow.png +0 -0
  98. data/docs/images/paylink-field-guards.png +0 -0
  99. data/lib/.DS_Store +0 -0
  100. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +565 -0
  101. data/lib/citypay_api_client/api/batch_processing_api__.rb +225 -0
  102. data/lib/citypay_api_client/api/{card_holder_account_api.rb → card_holder_account_api__.rb} +136 -46
  103. data/lib/citypay_api_client/api/direct_post_api__.rb +373 -0
  104. data/lib/citypay_api_client/api/operational_functions_api__.rb +356 -0
  105. data/lib/citypay_api_client/api/paylink_api__.rb +614 -0
  106. data/lib/citypay_api_client/api_client.rb +72 -70
  107. data/lib/citypay_api_client/api_error.rb +3 -2
  108. data/lib/citypay_api_client/configuration.rb +74 -17
  109. data/lib/citypay_api_client/models/account_create.rb +33 -23
  110. data/lib/citypay_api_client/models/account_status.rb +31 -23
  111. data/lib/citypay_api_client/models/acknowledgement.rb +43 -27
  112. data/lib/citypay_api_client/models/acl_check_request.rb +221 -0
  113. data/lib/citypay_api_client/models/acl_check_response_model.rb +244 -0
  114. data/lib/citypay_api_client/models/airline_advice.rb +63 -34
  115. data/lib/citypay_api_client/models/airline_segment.rb +51 -25
  116. data/lib/citypay_api_client/models/auth_reference.rb +80 -31
  117. data/lib/citypay_api_client/models/auth_references.rb +31 -23
  118. data/lib/citypay_api_client/models/auth_request.rb +137 -56
  119. data/lib/citypay_api_client/models/auth_response.rb +83 -123
  120. data/lib/citypay_api_client/models/authen_required.rb +31 -23
  121. data/lib/citypay_api_client/models/batch.rb +267 -0
  122. data/lib/citypay_api_client/models/batch_report_request.rb +278 -0
  123. data/lib/citypay_api_client/models/batch_report_response_model.rb +364 -0
  124. data/lib/citypay_api_client/models/batch_transaction.rb +324 -0
  125. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +452 -0
  126. data/lib/citypay_api_client/models/bin.rb +294 -0
  127. data/lib/citypay_api_client/models/bin_lookup.rb +231 -0
  128. data/lib/citypay_api_client/models/c_res_auth_request.rb +31 -23
  129. data/lib/citypay_api_client/models/capture_request.rb +59 -38
  130. data/lib/citypay_api_client/models/card.rb +93 -29
  131. data/lib/citypay_api_client/models/card_holder_account.rb +49 -27
  132. data/lib/citypay_api_client/models/card_status.rb +31 -23
  133. data/lib/citypay_api_client/models/charge_request.rb +154 -47
  134. data/lib/citypay_api_client/models/check_batch_status.rb +260 -0
  135. data/lib/citypay_api_client/models/check_batch_status_response.rb +215 -0
  136. data/lib/citypay_api_client/models/contact_details.rb +130 -52
  137. data/lib/citypay_api_client/models/decision.rb +31 -23
  138. data/lib/citypay_api_client/models/direct_post_request.rb +707 -0
  139. data/lib/citypay_api_client/models/direct_token_auth_request.rb +244 -0
  140. data/lib/citypay_api_client/models/domain_key_check_request.rb +249 -0
  141. data/lib/citypay_api_client/models/domain_key_request.rb +249 -0
  142. data/lib/citypay_api_client/models/domain_key_response.rb +297 -0
  143. data/lib/citypay_api_client/models/error.rb +57 -31
  144. data/lib/citypay_api_client/models/event_data_model.rb +254 -0
  145. data/lib/citypay_api_client/models/exists.rb +241 -0
  146. data/lib/citypay_api_client/models/external_mpi.rb +61 -27
  147. data/lib/citypay_api_client/models/list_merchants_response.rb +37 -25
  148. data/lib/citypay_api_client/models/mcc6012.rb +31 -23
  149. data/lib/citypay_api_client/models/merchant.rb +31 -23
  150. data/lib/citypay_api_client/models/pa_res_auth_request.rb +36 -24
  151. data/lib/citypay_api_client/models/paylink_address.rb +425 -0
  152. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +272 -0
  153. data/lib/citypay_api_client/models/paylink_attachment_request.rb +268 -0
  154. data/lib/citypay_api_client/models/paylink_attachment_result.rb +248 -0
  155. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +289 -0
  156. data/lib/citypay_api_client/models/paylink_card_holder.rb +360 -0
  157. data/lib/citypay_api_client/models/paylink_cart.rb +275 -0
  158. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +284 -0
  159. data/lib/citypay_api_client/models/paylink_config.rb +428 -0
  160. data/lib/citypay_api_client/models/paylink_custom_param.rb +321 -0
  161. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +265 -0
  162. data/lib/citypay_api_client/models/paylink_error_code.rb +238 -0
  163. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +274 -0
  164. data/lib/citypay_api_client/models/paylink_part_payments.rb +264 -0
  165. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +231 -0
  166. data/lib/citypay_api_client/models/paylink_state_event.rb +234 -0
  167. data/lib/citypay_api_client/models/paylink_token_created.rb +365 -0
  168. data/lib/citypay_api_client/models/paylink_token_request_model.rb +427 -0
  169. data/lib/citypay_api_client/models/paylink_token_status.rb +485 -0
  170. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +269 -0
  171. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +232 -0
  172. data/lib/citypay_api_client/models/paylink_ui.rb +244 -0
  173. data/lib/citypay_api_client/models/ping.rb +37 -25
  174. data/lib/citypay_api_client/models/process_batch_request.rb +313 -0
  175. data/lib/citypay_api_client/models/process_batch_response.rb +231 -0
  176. data/lib/citypay_api_client/models/refund_request.rb +339 -0
  177. data/lib/citypay_api_client/models/register_card.rb +79 -27
  178. data/lib/citypay_api_client/models/request_challenged.rb +39 -31
  179. data/lib/citypay_api_client/models/retrieve_request.rb +39 -25
  180. data/lib/citypay_api_client/models/three_d_secure.rb +116 -28
  181. data/lib/citypay_api_client/models/tokenisation_response_model.rb +332 -0
  182. data/lib/citypay_api_client/models/void_request.rb +39 -37
  183. data/lib/citypay_api_client/utils/digest_utils.rb +18 -0
  184. data/lib/citypay_api_client/utils/direct_post_mac.rb +22 -0
  185. data/lib/citypay_api_client/version.rb +3 -4
  186. data/lib/citypay_api_client.rb +53 -6
  187. data/spec/.DS_Store +0 -0
  188. data/spec/api/authorisation_and_payment_api___spec.rb +130 -0
  189. data/spec/api/batch_processing_api___spec.rb +70 -0
  190. data/spec/api/{card_holder_account_api_spec.rb → card_holder_account_api___spec.rb} +15 -3
  191. data/spec/api/direct_post_api___spec.rb +98 -0
  192. data/spec/api/operational_functions_api___spec.rb +94 -0
  193. data/spec/api/paylink_api___spec.rb +131 -0
  194. data/spec/api_client_spec.rb +4 -4
  195. data/spec/configuration_spec.rb +5 -5
  196. data/spec/it_api_sandbox_spec.rb +117 -55
  197. data/spec/models/account_create_spec.rb +1 -2
  198. data/spec/models/account_status_spec.rb +2 -2
  199. data/spec/models/acknowledgement_spec.rb +7 -22
  200. data/spec/models/acl_check_request_spec.rb +33 -0
  201. data/spec/models/acl_check_response_model_spec.rb +51 -0
  202. data/spec/models/airline_advice_spec.rb +0 -2
  203. data/spec/models/airline_segment_spec.rb +0 -2
  204. data/spec/models/auth_references_spec.rb +7 -8
  205. data/spec/models/auth_request_spec.rb +0 -2
  206. data/spec/models/auth_response_spec.rb +77 -33
  207. data/spec/models/batch_report_request_spec.rb +37 -0
  208. data/spec/models/batch_report_response_model_spec.rb +61 -0
  209. data/spec/models/batch_spec.rb +43 -0
  210. data/spec/models/batch_transaction_result_model_spec.rb +85 -0
  211. data/spec/models/batch_transaction_spec.rb +49 -0
  212. data/spec/models/bin_lookup_spec.rb +31 -0
  213. data/spec/models/bin_spec.rb +81 -0
  214. data/spec/models/capture_request_spec.rb +0 -2
  215. data/spec/models/card_holder_account_spec.rb +8 -7
  216. data/spec/models/charge_request_spec.rb +0 -2
  217. data/spec/models/check_batch_status_response_spec.rb +45 -0
  218. data/spec/models/check_batch_status_spec.rb +39 -0
  219. data/spec/models/decision_spec.rb +1 -1
  220. data/spec/models/direct_post_request_spec.rb +151 -0
  221. data/spec/models/direct_token_auth_request_spec.rb +51 -0
  222. data/spec/models/domain_key_check_request_spec.rb +31 -0
  223. data/spec/models/domain_key_request_spec.rb +45 -0
  224. data/spec/models/domain_key_response_spec.rb +57 -0
  225. data/spec/models/event_data_model_spec.rb +57 -0
  226. data/spec/{api/operational_api_spec.rb → models/exists_spec.rb} +14 -20
  227. data/spec/models/list_merchants_response_spec.rb +2 -2
  228. data/spec/models/paylink_address_spec.rb +69 -0
  229. data/spec/models/paylink_adjustment_request_spec.rb +45 -0
  230. data/spec/models/paylink_attachment_request_spec.rb +45 -0
  231. data/spec/models/paylink_attachment_result_spec.rb +45 -0
  232. data/spec/models/paylink_bill_payment_token_request_spec.rb +63 -0
  233. data/spec/models/paylink_card_holder_spec.rb +87 -0
  234. data/spec/models/paylink_cart_item_model_spec.rb +75 -0
  235. data/spec/models/paylink_cart_spec.rb +69 -0
  236. data/spec/models/paylink_config_spec.rb +159 -0
  237. data/spec/models/paylink_custom_param_spec.rb +87 -0
  238. data/spec/models/paylink_email_notification_path_spec.rb +57 -0
  239. data/spec/models/paylink_error_code_spec.rb +39 -0
  240. data/spec/models/paylink_field_guard_model_spec.rb +45 -0
  241. data/spec/models/paylink_part_payments_spec.rb +63 -0
  242. data/spec/models/paylink_sms_notification_path_spec.rb +39 -0
  243. data/spec/models/paylink_state_event_spec.rb +45 -0
  244. data/spec/models/paylink_token_created_spec.rb +111 -0
  245. data/spec/models/paylink_token_request_model_spec.rb +91 -0
  246. data/spec/models/paylink_token_status_change_request_spec.rb +57 -0
  247. data/spec/models/paylink_token_status_change_response_spec.rb +39 -0
  248. data/spec/models/paylink_token_status_spec.rb +195 -0
  249. data/spec/models/paylink_ui_spec.rb +51 -0
  250. data/spec/models/process_batch_request_spec.rb +49 -0
  251. data/spec/models/process_batch_response_spec.rb +39 -0
  252. data/spec/models/refund_request_spec.rb +62 -0
  253. data/spec/models/register_card_spec.rb +0 -2
  254. data/spec/models/tokenisation_response_model_spec.rb +87 -0
  255. data/spec/spec_helper.rb +2 -2
  256. data/spec/utils/direct_post_mac_spec.rb +13 -0
  257. metadata +230 -44
  258. data/Gemfile.lock +0 -70
  259. data/docs/OperationalApi.md +0 -112
  260. data/docs/PaymentProcessingApi.md +0 -320
  261. data/git_push.sh +0 -58
  262. data/lib/citypay_api_client/api/operational_api.rb +0 -147
  263. data/lib/citypay_api_client/api/payment_processing_api.rb +0 -405
  264. data/lib/citypay_api_client/test.rb +0 -20
  265. data/spec/api/payment_processing_api_spec.rb +0 -106
data/Gemfile.lock DELETED
@@ -1,70 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- citypay_api_client (1.0.3)
5
- json (~> 2.1, >= 2.1.0)
6
- typhoeus (~> 1.0, >= 1.0.1)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- ast (2.4.1)
12
- byebug (11.1.3)
13
- coderay (1.1.3)
14
- diff-lcs (1.4.4)
15
- ethon (0.12.0)
16
- ffi (>= 1.3.0)
17
- ffi (1.13.1)
18
- jaro_winkler (1.5.4)
19
- json (2.3.1)
20
- method_source (1.0.0)
21
- parallel (1.19.2)
22
- parser (2.7.1.4)
23
- ast (~> 2.4.1)
24
- pry (0.13.1)
25
- coderay (~> 1.1)
26
- method_source (~> 1.0)
27
- pry-byebug (3.9.0)
28
- byebug (~> 11.0)
29
- pry (~> 0.13.0)
30
- psych (3.2.0)
31
- rainbow (3.0.0)
32
- rake (13.0.1)
33
- rspec (3.9.0)
34
- rspec-core (~> 3.9.0)
35
- rspec-expectations (~> 3.9.0)
36
- rspec-mocks (~> 3.9.0)
37
- rspec-core (3.9.2)
38
- rspec-support (~> 3.9.3)
39
- rspec-expectations (3.9.2)
40
- diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.9.0)
42
- rspec-mocks (3.9.1)
43
- diff-lcs (>= 1.2.0, < 2.0)
44
- rspec-support (~> 3.9.0)
45
- rspec-support (3.9.3)
46
- rubocop (0.66.0)
47
- jaro_winkler (~> 1.5.1)
48
- parallel (~> 1.10)
49
- parser (>= 2.5, != 2.5.1.1)
50
- psych (>= 3.1.0)
51
- rainbow (>= 2.2.2, < 4.0)
52
- ruby-progressbar (~> 1.7)
53
- unicode-display_width (>= 1.4.0, < 1.6)
54
- ruby-progressbar (1.10.1)
55
- typhoeus (1.4.0)
56
- ethon (>= 0.9.0)
57
- unicode-display_width (1.5.0)
58
-
59
- PLATFORMS
60
- ruby
61
-
62
- DEPENDENCIES
63
- citypay_api_client!
64
- pry-byebug
65
- rake (~> 13.0.1)
66
- rspec (~> 3.6, >= 3.6.0)
67
- rubocop (~> 0.66.0)
68
-
69
- BUNDLED WITH
70
- 2.1.4
@@ -1,112 +0,0 @@
1
- # CityPayApiClient::OperationalApi
2
-
3
- All URIs are relative to *https://api.citypay.com/v6*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**list_merchants_request**](OperationalApi.md#list_merchants_request) | **GET** /merchants/{clientid} | List Merchants Request
8
- [**ping_request**](OperationalApi.md#ping_request) | **POST** /ping | Ping Request
9
-
10
-
11
-
12
- ## list_merchants_request
13
-
14
- > ListMerchantsResponse list_merchants_request(clientid)
15
-
16
- List Merchants Request
17
-
18
- An operational request to list current merchants for a client. ### Sorting Sorting can be performed by include a query parameter i.e. `/merchants/?sort=merchantid` Fields that can be sorted are `merchantid` or `name`.
19
-
20
- ### Example
21
-
22
- ```ruby
23
- # load the gem
24
- require 'citypay_api_client'
25
- # setup authorization
26
- CityPayApiClient.configure do |config|
27
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
28
- end
29
-
30
- api_instance = CityPayApiClient::OperationalApi.new
31
- clientid = 'clientid_example' # String | The client id to return merchants for, specifying \"default\" will use the value in your api key.
32
-
33
- begin
34
- #List Merchants Request
35
- result = api_instance.list_merchants_request(clientid)
36
- p result
37
- rescue CityPayApiClient::ApiError => e
38
- puts "Exception when calling OperationalApi->list_merchants_request: #{e}"
39
- end
40
- ```
41
-
42
- ### Parameters
43
-
44
-
45
- Name | Type | Description | Notes
46
- ------------- | ------------- | ------------- | -------------
47
- **clientid** | **String**| The client id to return merchants for, specifying \&quot;default\&quot; will use the value in your api key. |
48
-
49
- ### Return type
50
-
51
- [**ListMerchantsResponse**](ListMerchantsResponse.md)
52
-
53
- ### Authorization
54
-
55
- [cp-api-key](../README.md#cp-api-key)
56
-
57
- ### HTTP request headers
58
-
59
- - **Content-Type**: Not defined
60
- - **Accept**: application/json, text/xml
61
-
62
-
63
- ## ping_request
64
-
65
- > Acknowledgement ping_request(ping)
66
-
67
- Ping Request
68
-
69
- A ping request which performs a connection and authentication test to the CityPay API server. The request will return a standard Acknowledgement with a response code `044` to signify a successful ping. The ping call is useful to confirm that you will be able to access the API from behind any firewalls and that the permission model is granting access from your source.
70
-
71
- ### Example
72
-
73
- ```ruby
74
- # load the gem
75
- require 'citypay_api_client'
76
- # setup authorization
77
- CityPayApiClient.configure do |config|
78
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
79
- end
80
-
81
- api_instance = CityPayApiClient::OperationalApi.new
82
- ping = CityPayApiClient::Ping.new # Ping |
83
-
84
- begin
85
- #Ping Request
86
- result = api_instance.ping_request(ping)
87
- p result
88
- rescue CityPayApiClient::ApiError => e
89
- puts "Exception when calling OperationalApi->ping_request: #{e}"
90
- end
91
- ```
92
-
93
- ### Parameters
94
-
95
-
96
- Name | Type | Description | Notes
97
- ------------- | ------------- | ------------- | -------------
98
- **ping** | [**Ping**](Ping.md)| |
99
-
100
- ### Return type
101
-
102
- [**Acknowledgement**](Acknowledgement.md)
103
-
104
- ### Authorization
105
-
106
- [cp-api-key](../README.md#cp-api-key)
107
-
108
- ### HTTP request headers
109
-
110
- - **Content-Type**: application/json, text/xml
111
- - **Accept**: application/json, text/xml
112
-
@@ -1,320 +0,0 @@
1
- # CityPayApiClient::PaymentProcessingApi
2
-
3
- All URIs are relative to *https://api.citypay.com/v6*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**authorisation_request**](PaymentProcessingApi.md#authorisation_request) | **POST** /authorise | Authorisation
8
- [**c_res_request**](PaymentProcessingApi.md#c_res_request) | **POST** /cres | CRes
9
- [**capture_request**](PaymentProcessingApi.md#capture_request) | **POST** /capture | Capture
10
- [**pa_res_request**](PaymentProcessingApi.md#pa_res_request) | **POST** /pares | PaRes
11
- [**retrieval_request**](PaymentProcessingApi.md#retrieval_request) | **POST** /retrieve | Retrieval
12
- [**void_request**](PaymentProcessingApi.md#void_request) | **POST** /void | Void
13
-
14
-
15
-
16
- ## authorisation_request
17
-
18
- > Decision authorisation_request(auth_request)
19
-
20
- Authorisation
21
-
22
- An authorisation process performs a standard transaction authorisation based on the provided parameters of its request. The CityPay gateway will route your transaction via an Acquiring bank for subsequent authorisation to the appropriate card schemes such as Visa or MasterCard. The authorisation API should be used for server environments to process transactions on demand and in realtime. The authorisation API can be used for multiple types of transactions including E-commerce, mail order, telephone order, customer present (keyed), continuous authority, pre-authorisation and others. CityPay will configure your account for the appropriate coding and this will perform transparently by the gateway. Data properties that are required, may depend on the environment you are conducting payment for. Our API aims to be flexible enough to cater for these structures. Our integration team will aid you in providing the necessary data to transact. ### E-commerce workflows For E-commerce transactions requiring 3DSv1 and 3DSv2 transactions, the API contains a fully accredited in built mechanism to handle authentication. The gateway has been accredited extensively with both Acquirers and Card Schemes and simplifies the nature of these calls into a simple structure for authentication, preventing integrators from performing lengthy and a costly accreditation with Visa and MasterCard. 3D-secure has been around for a number of years and aims to shift the liability of a transaction away from a merchant back to the card holder. A *liability shift* determines whether a card holder can charge back a transaction as unknown. Effectively the process asks for a card holder to authenticate the transaction prior to authorisation producing a Cardholder verification value (CAVV) as evidence of authorisation. #### 3DSv1 ```json { \"AuthenticationRequired\": { \"acsurl\": \"https://bank.com/3DS/ACS\", \"pareq\": \"SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...\", \"md\": \"WQgZXZlcnl0aGluZyBiZW\" } } ``` ```xml <AuthenticationRequired> <acsurl>https://bank.com/3DS/ACS</acsurl> <pareq>SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...</pareq> <md>WQgZXZlcnl0aGluZyBiZW</md> </AuthenticationRequired> ``` For E-commerce transactions requiring 3DSv1, the API contains a built in MPI which will be called to check whether the card is participating in 3DSv1 with Verified by Visa or MasterCard SecureCode. We only support Amex SafeKey with 3DSv2. Should the card be enrolled, a payer request (PAReq) value will be created and returned back as an [authentication required](#authenticationrequired) response object. Your system will need to process this authentication packet and forward the user's browser to an authentication server (ACS) to gain the user's authentication. Once complete, the ACS will produce a HTTP `POST` call back to the URL supplied in the authentication request as `merchant_termurl`. This URL should behave as a controller and handle the post data from the ACS and on a forked server to server HTTP request, forward this data to the [pares authentication url](#pares) for subsequent authorisation processing. You may prefer to provide a processing page whilst this is being processed. Processing with our systems should be relatively quick and be between 500ms - 3000ms however it is desirable to let the user see that something is happening rather than a pending browser. The main reason for ensuring that this controller is two fold: 1. We are never in control of the user's browser in a server API call 2. The controller is actioned on your site to ensure that any post actions from authorisation can be executed in real time To forward the user to the ACS, we recommend a simple auto submit HTML form. ```html <html lang=\"en\"> <head> <title>Forward to ACS</title> <script type=\"text/javascript\"> function onLoadEvent() { document.acs.submit(); } </script> <noscript>You will require JavaScript to be enabled to complete this transaction</noscript> </head> <body onload=\"onLoadEvent();\"> <form name=\"acs\" action=\"{{ACSURL from Response}}\" method=\"POST\"> <input type=\"hidden\" name=\"PaReq\" value=\"{{PaReq Packet from Response}}\" /> <input type=\"hidden\" name=\"TermUrl\" value=\"{{Your Controller}}\" /> <input type=\"hidden\" name=\"MD\" value=\"{{MD From Response}}\" /> </form> </body> </html> ``` Please note that 3DSv1 is being phased out due to changes to strong customer authentication mechanisms. 3DSv2 addresses this and will solidify the authorisation and confirmation process. We provide a Test ACS for full 3DSv1 integration testing that simulates an ACS. #### 3DSv2 ```json { \"RequestChallenged\": { \"acsurl\": \"https://bank.com/3DS/ACS\", \"creq\": \"SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...\" } } ``` ```xml <RequestChallenged> <acsurl>https://bank.com/3DS/ACS</acsurl> <creq>SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...</creq> </RequestChallenged> ``` All merchants in the EEC will require to migrate their E-commerce transactions to a secure customer authentication model (SCA) throughout 2020. This has been adopted by the payment's industry as a progressive move alongside the European Unions payments service directive. CityPay support 3DSv2 for Verified by Visa, MasterCard Identity Check and American Express SafeKey 2.0 and will be rolling out acquirers on the new platform from Q2 2020. The new enhancement to 3DSv2 will allow for CityPay to seamlessly authenticate transactions in a \"frictionless\" flowed method which will authenticate low risk transactions with minimal impact to a standard authorisation flow. Our API simply performs this on behalf of the merchant and cardholder. For these transactions you will not be required to change anything. However, should a transaction be \"challenged\" the API will return a [request challenge](#requestchallenged) which will require your integration to forward the cardholder's browser to the given [ACS url](#acsurl) by posting the [creq](#creq) value. Once complete, the ACS will have already been in touch with our servers by sending us a result of the authentication known as `RReq`. Our servers however will await confirmation that the authorisation should continue and on receipt of a [cres](#cres) value, the flow will perform full authorisation processing. Please note that the CRes returned to us is purely a mechanism of acknowledging that transactions should be committed for authorisation. The ACS by this point will have sent us the verification value (CAVV) to perform a liability shift. The CRes value will be validated for receipt of the CAVV and subsequently may return back response codes illustrating this. To forward the user to the ACS, we recommend a simple auto submit HTML form. ```html <html lang=\"en\"> <head> <title>Forward to ACS</title> <script type=\"text/javascript\"> function onLoadEvent() { document.acs.submit(); } </script> <noscript>You will require JavaScript to be enabled to complete this transaction</noscript> </head> <body onload=\"onLoadEvent();\"> <form name=\"acs\" action=\"{{ACSURL from Response}}\" method=\"POST\"> <input type=\"hidden\" name=\"creq\" value=\"{{CReq Packet from Response}}\" /> </form> </body> </html> ``` We are currently working on an integration test suite for 3DSv2 which will mock the ACS challenge process.
23
-
24
- ### Example
25
-
26
- ```ruby
27
- # load the gem
28
- require 'citypay_api_client'
29
- # setup authorization
30
- CityPayApiClient.configure do |config|
31
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
32
- end
33
-
34
- api_instance = CityPayApiClient::PaymentProcessingApi.new
35
- auth_request = CityPayApiClient::AuthRequest.new # AuthRequest |
36
-
37
- begin
38
- #Authorisation
39
- result = api_instance.authorisation_request(auth_request)
40
- p result
41
- rescue CityPayApiClient::ApiError => e
42
- puts "Exception when calling PaymentProcessingApi->authorisation_request: #{e}"
43
- end
44
- ```
45
-
46
- ### Parameters
47
-
48
-
49
- Name | Type | Description | Notes
50
- ------------- | ------------- | ------------- | -------------
51
- **auth_request** | [**AuthRequest**](AuthRequest.md)| |
52
-
53
- ### Return type
54
-
55
- [**Decision**](Decision.md)
56
-
57
- ### Authorization
58
-
59
- [cp-api-key](../README.md#cp-api-key)
60
-
61
- ### HTTP request headers
62
-
63
- - **Content-Type**: application/json, text/xml
64
- - **Accept**: application/json, text/xml
65
-
66
-
67
- ## c_res_request
68
-
69
- > AuthResponse c_res_request(c_res_auth_request)
70
-
71
- CRes
72
-
73
- The CRes request performs authorisation processing once a challenge request has been completed with an Authentication Server (ACS). This challenge response contains confirmation that will allow the API systems to return an authorisation response based on the result. Our systems will know out of band via an `RReq` call by the ACS to notify us if the liability shift has been issued. Any call to the CRes operation will require a previous authorisation request and cannot be called on its own without a previous [request challenge](#requestchallenged) being obtained.
74
-
75
- ### Example
76
-
77
- ```ruby
78
- # load the gem
79
- require 'citypay_api_client'
80
- # setup authorization
81
- CityPayApiClient.configure do |config|
82
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
83
- end
84
-
85
- api_instance = CityPayApiClient::PaymentProcessingApi.new
86
- c_res_auth_request = CityPayApiClient::CResAuthRequest.new # CResAuthRequest |
87
-
88
- begin
89
- #CRes
90
- result = api_instance.c_res_request(c_res_auth_request)
91
- p result
92
- rescue CityPayApiClient::ApiError => e
93
- puts "Exception when calling PaymentProcessingApi->c_res_request: #{e}"
94
- end
95
- ```
96
-
97
- ### Parameters
98
-
99
-
100
- Name | Type | Description | Notes
101
- ------------- | ------------- | ------------- | -------------
102
- **c_res_auth_request** | [**CResAuthRequest**](CResAuthRequest.md)| |
103
-
104
- ### Return type
105
-
106
- [**AuthResponse**](AuthResponse.md)
107
-
108
- ### Authorization
109
-
110
- [cp-api-key](../README.md#cp-api-key)
111
-
112
- ### HTTP request headers
113
-
114
- - **Content-Type**: application/json, text/xml
115
- - **Accept**: application/json, text/xml
116
-
117
-
118
- ## capture_request
119
-
120
- > Acknowledgement capture_request(capture_request)
121
-
122
- Capture
123
-
124
- _The capture process only applies to transactions which have been pre-authorised only._ The capture process will ensure that a transaction will now settle. It is expected that a capture call will be provided within 3 days or a maximum of 7 days. A capture request is provided to confirm that you wish the transaction to be settled. This request can contain a final amount for the transaction which is different to the original authorisation amount. This may be useful in a delayed system process such as waiting for stock to be ordered, confirmed, or services provided before the final cost is known. When a transaction is completed, a new authorisation code may be created and a new confirmation can be sent online to the acquiring bank. Once the transaction has been processed. A standard [`Acknowledgement`](#acknowledgement) will be returned, outlining the result of the transaction. On a successful completion process, the transaction will be available for the settlement and completed at the end of the day.
125
-
126
- ### Example
127
-
128
- ```ruby
129
- # load the gem
130
- require 'citypay_api_client'
131
- # setup authorization
132
- CityPayApiClient.configure do |config|
133
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
134
- end
135
-
136
- api_instance = CityPayApiClient::PaymentProcessingApi.new
137
- capture_request = CityPayApiClient::CaptureRequest.new # CaptureRequest |
138
-
139
- begin
140
- #Capture
141
- result = api_instance.capture_request(capture_request)
142
- p result
143
- rescue CityPayApiClient::ApiError => e
144
- puts "Exception when calling PaymentProcessingApi->capture_request: #{e}"
145
- end
146
- ```
147
-
148
- ### Parameters
149
-
150
-
151
- Name | Type | Description | Notes
152
- ------------- | ------------- | ------------- | -------------
153
- **capture_request** | [**CaptureRequest**](CaptureRequest.md)| |
154
-
155
- ### Return type
156
-
157
- [**Acknowledgement**](Acknowledgement.md)
158
-
159
- ### Authorization
160
-
161
- [cp-api-key](../README.md#cp-api-key)
162
-
163
- ### HTTP request headers
164
-
165
- - **Content-Type**: application/json, text/xml
166
- - **Accept**: application/json, text/xml
167
-
168
-
169
- ## pa_res_request
170
-
171
- > AuthResponse pa_res_request(pa_res_auth_request)
172
-
173
- PaRes
174
-
175
- The Payer Authentication Response (PaRes) is an operation after the result of authentication being performed. The request uses an encoded packet of authentication data to notify us of the completion of the liability shift. Once this value has been unpacked and its signature is checked, our systems will proceed to authorisation processing. Any call to the PaRes operation will require a previous authorisation request and cannot be called on its own without a previous [authentication required](#authenticationrequired) being obtained.
176
-
177
- ### Example
178
-
179
- ```ruby
180
- # load the gem
181
- require 'citypay_api_client'
182
- # setup authorization
183
- CityPayApiClient.configure do |config|
184
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
185
- end
186
-
187
- api_instance = CityPayApiClient::PaymentProcessingApi.new
188
- pa_res_auth_request = CityPayApiClient::PaResAuthRequest.new # PaResAuthRequest |
189
-
190
- begin
191
- #PaRes
192
- result = api_instance.pa_res_request(pa_res_auth_request)
193
- p result
194
- rescue CityPayApiClient::ApiError => e
195
- puts "Exception when calling PaymentProcessingApi->pa_res_request: #{e}"
196
- end
197
- ```
198
-
199
- ### Parameters
200
-
201
-
202
- Name | Type | Description | Notes
203
- ------------- | ------------- | ------------- | -------------
204
- **pa_res_auth_request** | [**PaResAuthRequest**](PaResAuthRequest.md)| |
205
-
206
- ### Return type
207
-
208
- [**AuthResponse**](AuthResponse.md)
209
-
210
- ### Authorization
211
-
212
- [cp-api-key](../README.md#cp-api-key)
213
-
214
- ### HTTP request headers
215
-
216
- - **Content-Type**: application/json, text/xml
217
- - **Accept**: application/json, text/xml
218
-
219
-
220
- ## retrieval_request
221
-
222
- > AuthReferences retrieval_request(retrieve_request)
223
-
224
- Retrieval
225
-
226
- A retrieval request which allows an integration to obtain the result of a transaction processed in the last 90 days. The request allows for retrieval based on the identifier or transaction number. The process may return multiple results in particular where a transaction was processed multiple times against the same identifier. This can happen if errors were first received. The API therefore returns up to the first 5 transactions in the latest date time order. It is not intended for this operation to be a replacement for reporting and only allows for base transaction information to be returned.
227
-
228
- ### Example
229
-
230
- ```ruby
231
- # load the gem
232
- require 'citypay_api_client'
233
- # setup authorization
234
- CityPayApiClient.configure do |config|
235
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
236
- end
237
-
238
- api_instance = CityPayApiClient::PaymentProcessingApi.new
239
- retrieve_request = CityPayApiClient::RetrieveRequest.new # RetrieveRequest |
240
-
241
- begin
242
- #Retrieval
243
- result = api_instance.retrieval_request(retrieve_request)
244
- p result
245
- rescue CityPayApiClient::ApiError => e
246
- puts "Exception when calling PaymentProcessingApi->retrieval_request: #{e}"
247
- end
248
- ```
249
-
250
- ### Parameters
251
-
252
-
253
- Name | Type | Description | Notes
254
- ------------- | ------------- | ------------- | -------------
255
- **retrieve_request** | [**RetrieveRequest**](RetrieveRequest.md)| |
256
-
257
- ### Return type
258
-
259
- [**AuthReferences**](AuthReferences.md)
260
-
261
- ### Authorization
262
-
263
- [cp-api-key](../README.md#cp-api-key)
264
-
265
- ### HTTP request headers
266
-
267
- - **Content-Type**: application/json, text/xml
268
- - **Accept**: application/json, text/xml
269
-
270
-
271
- ## void_request
272
-
273
- > Acknowledgement void_request(void_request)
274
-
275
- Void
276
-
277
- _The void process generally applies to transactions which have been pre-authorised only however voids can occur on the same day if performed before batching and settlement._ The void process will ensure that a transaction will now settle. It is expected that a void call will be provided on the same day before batching and settlement or within 3 days or within a maximum of 7 days. Once the transaction has been processed as a void, an [`Acknowledgement`](#acknowledgement) will be returned, outlining the result of the transaction.
278
-
279
- ### Example
280
-
281
- ```ruby
282
- # load the gem
283
- require 'citypay_api_client'
284
- # setup authorization
285
- CityPayApiClient.configure do |config|
286
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
287
- end
288
-
289
- api_instance = CityPayApiClient::PaymentProcessingApi.new
290
- void_request = CityPayApiClient::VoidRequest.new # VoidRequest |
291
-
292
- begin
293
- #Void
294
- result = api_instance.void_request(void_request)
295
- p result
296
- rescue CityPayApiClient::ApiError => e
297
- puts "Exception when calling PaymentProcessingApi->void_request: #{e}"
298
- end
299
- ```
300
-
301
- ### Parameters
302
-
303
-
304
- Name | Type | Description | Notes
305
- ------------- | ------------- | ------------- | -------------
306
- **void_request** | [**VoidRequest**](VoidRequest.md)| |
307
-
308
- ### Return type
309
-
310
- [**Acknowledgement**](Acknowledgement.md)
311
-
312
- ### Authorization
313
-
314
- [cp-api-key](../README.md#cp-api-key)
315
-
316
- ### HTTP request headers
317
-
318
- - **Content-Type**: application/json, text/xml
319
- - **Accept**: application/json, text/xml
320
-
data/git_push.sh DELETED
@@ -1,58 +0,0 @@
1
- #!/bin/sh
2
- # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
- #
4
- # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5
-
6
- git_user_id=$1
7
- git_repo_id=$2
8
- release_note=$3
9
- git_host=$4
10
-
11
- if [ "$git_host" = "" ]; then
12
- git_host="github.com"
13
- echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
- fi
15
-
16
- if [ "$git_user_id" = "" ]; then
17
- git_user_id="citypay"
18
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
- fi
20
-
21
- if [ "$git_repo_id" = "" ]; then
22
- git_repo_id="citypay-api-client-ruby"
23
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
- fi
25
-
26
- if [ "$release_note" = "" ]; then
27
- release_note="Minor update"
28
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
- fi
30
-
31
- # Initialize the local directory as a Git repository
32
- git init
33
-
34
- # Adds the files in the local repository and stages them for commit.
35
- git add .
36
-
37
- # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
- git commit -m "$release_note"
39
-
40
- # Sets the new remote
41
- git_remote=`git remote`
42
- if [ "$git_remote" = "" ]; then # git remote not defined
43
-
44
- if [ "$GIT_TOKEN" = "" ]; then
45
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
- git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
- else
48
- git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49
- fi
50
-
51
- fi
52
-
53
- git pull origin master
54
-
55
- # Pushes (Forces) the changes in the local repository up to the remote repository
56
- echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
- git push origin master 2>&1 | grep -v 'To https'
58
-