citypay_api_client 1.1.1 → 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.
- checksums.yaml +4 -4
- data/README.md +15 -14
- data/citypay_api_client.gemspec +4 -3
- data/docs/AirlineAdvice.md +1 -1
- data/docs/AuthRequest.md +3 -1
- data/docs/AuthResponse.md +5 -1
- data/docs/AuthorisationAndPaymentApi.md +300 -9
- data/docs/BatchProcessingApi.md +15 -11
- data/docs/BatchTransactionResultModel.md +5 -1
- data/docs/Card.md +1 -1
- data/docs/CardHolderAccountApi.md +64 -9
- data/docs/ChargeRequest.md +2 -0
- data/docs/ContactDetails.md +11 -11
- data/docs/DirectPostApi.md +40 -16
- data/docs/DirectPostRequest.md +3 -1
- data/docs/OperationalFunctionsApi.md +28 -8
- data/docs/PaylinkApi.md +249 -73
- data/docs/PaylinkCustomParam.md +3 -1
- data/docs/PaylinkFieldGuardModel.md +1 -1
- data/docs/PaylinkTokenRequestModel.md +4 -0
- data/docs/RegisterCard.md +1 -1
- data/docs/ThreeDSecure.md +1 -1
- data/docs/TokenisationResponseModel.md +2 -2
- data/docs/images/3dsv1-challenge.png +0 -0
- data/docs/images/3dsv2-challenge.png +0 -0
- data/docs/images/3dsv2-frictionless.png +0 -0
- data/docs/images/3dsv2-method-challenge.png +0 -0
- data/docs/images/3dsv2-method-frictionless.png +0 -0
- data/docs/images/3dsv2-no3d.png +0 -0
- data/docs/images/citypay-logo.svg +1 -0
- data/docs/images/direct-post-flow.png +0 -0
- data/docs/images/favicon.ico +0 -0
- data/docs/images/header.png +0 -0
- data/docs/images/logo.ai +1913 -4
- data/docs/images/logo.png +0 -0
- data/docs/images/logo.svg +1 -0
- data/docs/images/merchant-BPS-workflow.png +0 -0
- data/docs/images/paylink-field-guards.png +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +4 -4
- data/lib/citypay_api_client/api/batch_processing_api__.rb +11 -11
- data/lib/citypay_api_client/api/card_holder_account_api__.rb +2 -2
- data/lib/citypay_api_client/api/direct_post_api__.rb +5 -5
- data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
- data/lib/citypay_api_client/api/paylink_api__.rb +74 -74
- data/lib/citypay_api_client/api_client.rb +24 -22
- data/lib/citypay_api_client/api_error.rb +3 -2
- data/lib/citypay_api_client/configuration.rb +28 -9
- data/lib/citypay_api_client/models/account_create.rb +17 -20
- data/lib/citypay_api_client/models/account_status.rb +15 -20
- data/lib/citypay_api_client/models/acknowledgement.rb +27 -24
- data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
- data/lib/citypay_api_client/models/acl_check_response_model.rb +15 -20
- data/lib/citypay_api_client/models/airline_advice.rb +45 -29
- data/lib/citypay_api_client/models/airline_segment.rb +35 -22
- data/lib/citypay_api_client/models/auth_reference.rb +41 -26
- data/lib/citypay_api_client/models/auth_references.rb +15 -20
- data/lib/citypay_api_client/models/auth_request.rb +66 -29
- data/lib/citypay_api_client/models/auth_response.rb +45 -22
- data/lib/citypay_api_client/models/authen_required.rb +15 -20
- data/lib/citypay_api_client/models/batch.rb +24 -21
- data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
- data/lib/citypay_api_client/models/batch_report_response_model.rb +27 -20
- data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
- data/lib/citypay_api_client/models/bin.rb +15 -20
- data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
- data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/capture_request.rb +27 -22
- data/lib/citypay_api_client/models/card.rb +33 -26
- data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
- data/lib/citypay_api_client/models/card_status.rb +15 -20
- data/lib/citypay_api_client/models/charge_request.rb +66 -29
- data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
- data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
- data/lib/citypay_api_client/models/contact_details.rb +77 -42
- data/lib/citypay_api_client/models/decision.rb +15 -20
- data/lib/citypay_api_client/models/direct_post_request.rb +66 -29
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
- data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
- data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
- data/lib/citypay_api_client/models/error.rb +27 -24
- data/lib/citypay_api_client/models/event_data_model.rb +15 -20
- data/lib/citypay_api_client/models/exists.rb +17 -20
- data/lib/citypay_api_client/models/external_mpi.rb +39 -24
- data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
- data/lib/citypay_api_client/models/mcc6012.rb +15 -20
- data/lib/citypay_api_client/models/merchant.rb +15 -20
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_address.rb +52 -29
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
- data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
- data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
- data/lib/citypay_api_client/models/paylink_config.rb +15 -20
- data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
- data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_state_event.rb +15 -20
- data/lib/citypay_api_client/models/paylink_token_created.rb +21 -20
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
- data/lib/citypay_api_client/models/paylink_token_status.rb +15 -20
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +17 -20
- data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
- data/lib/citypay_api_client/models/ping.rb +21 -22
- data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
- data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
- data/lib/citypay_api_client/models/refund_request.rb +28 -21
- data/lib/citypay_api_client/models/register_card.rb +27 -22
- data/lib/citypay_api_client/models/request_challenged.rb +15 -20
- data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
- data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
- data/lib/citypay_api_client/models/void_request.rb +23 -22
- data/lib/citypay_api_client/version.rb +3 -3
- data/lib/citypay_api_client.rb +2 -2
- data/spec/.DS_Store +0 -0
- data/spec/it_api_sandbox_spec.rb +5 -11
- data/spec/models/account_create_spec.rb +1 -2
- data/spec/models/account_status_spec.rb +2 -2
- data/spec/models/airline_advice_spec.rb +0 -2
- data/spec/models/airline_segment_spec.rb +0 -2
- data/spec/models/auth_request_spec.rb +0 -2
- data/spec/models/auth_response_spec.rb +75 -30
- data/spec/models/batch_report_request_spec.rb +0 -2
- data/spec/models/batch_report_response_model_spec.rb +0 -2
- data/spec/models/batch_spec.rb +0 -2
- data/spec/models/batch_transaction_result_model_spec.rb +0 -2
- data/spec/models/batch_transaction_spec.rb +0 -2
- data/spec/models/bin_lookup_spec.rb +0 -2
- data/spec/models/capture_request_spec.rb +0 -2
- data/spec/models/card_holder_account_spec.rb +0 -2
- data/spec/models/charge_request_spec.rb +0 -2
- data/spec/models/direct_post_request_spec.rb +0 -2
- data/spec/models/domain_key_check_request_spec.rb +0 -2
- data/spec/models/paylink_token_request_model_spec.rb +0 -2
- data/spec/models/process_batch_request_spec.rb +0 -2
- data/spec/models/refund_request_spec.rb +0 -2
- data/spec/models/register_card_spec.rb +0 -2
- data/spec/spec_helper.rb +2 -2
- metadata +25 -12
- data/docs/OperationalApi.md +0 -214
- data/docs/PaymentProcessingApi.md +0 -559
@@ -1,559 +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
|
-
| [**bin_range_lookup_request**](PaymentProcessingApi.md#bin_range_lookup_request) | **POST** /bin | Bin Lookup |
|
9
|
-
| [**c_res_request**](PaymentProcessingApi.md#c_res_request) | **POST** /cres | CRes |
|
10
|
-
| [**capture_request**](PaymentProcessingApi.md#capture_request) | **POST** /capture | Capture |
|
11
|
-
| [**pa_res_request**](PaymentProcessingApi.md#pa_res_request) | **POST** /pares | PaRes |
|
12
|
-
| [**refund_request**](PaymentProcessingApi.md#refund_request) | **POST** /refund | Refund |
|
13
|
-
| [**retrieval_request**](PaymentProcessingApi.md#retrieval_request) | **POST** /retrieve | Retrieval |
|
14
|
-
| [**void_request**](PaymentProcessingApi.md#void_request) | **POST** /void | Void |
|
15
|
-
|
16
|
-
|
17
|
-
## authorisation_request
|
18
|
-
|
19
|
-
> <Decision> authorisation_request(auth_request)
|
20
|
-
|
21
|
-
Authorisation
|
22
|
-
|
23
|
-
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 3DS, the API contains a fully accredited in built mechanism to handle authentication. The Api and gateway has been accredited extensively with both Acquirers and Card Schemes to simplify the nature of these calls into a simple structure for authentication, preventing integrators from performing lengthy and a costly accreditations 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) and ecommerce indicator (ECI) as evidence of authorisation. 3DS version 1 has now been replaced by 3DS version 2 to provide secure customer authentication (SCA) in line with EU regulation. 3DSv2 is being phased out and any accounts using version 1 of the protocol is expected to be migrated by March 2022. Any new integrations should only consider 3DSv2 flows. ### 3DSv2 ```json { \"RequestChallenged\": { \"acsurl\": \"https://bank.com/3DS/ACS\", \"creq\": \"SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...\", \"merchantid\": 12345, \"transno\": 1, \"threedserver_trans_id\": \"d652d8d2-d74a-4264-a051-a7862b10d5d6\" } } ``` ```xml <RequestChallenged> <acsurl>https://bank.com/3DS/ACS</acsurl> <creq>SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...</creq> <merchantid>12345</merchantid> <transno>1</transno> <threedserver_trans_id>d652d8d2-d74a-4264-a051-a7862b10d5d6</threedserver_trans_id> </RequestChallenged> ``` CityPay support 3DS version 2.1 for Verified by Visa, MasterCard Identity Check and American Express SafeKey 2.1. Version 2.2 is currently in development however this will be a seamless upgrade for all integrations. #### 3-D Secure - None  A basic flow may involve no 3-D secure processing. This could happen if there is no ability to perform authentication. An enrollment check may apply an \"attempted\" resolution to processing. In this instance a transaction may not meet any liability shift. A transaction may result in a decline due to this. We are also able to prevent from transactions being presented for authorisation if this occurs. #### 3-D Secure - Frictionless  E-commerce transactions supporting 3DSv2 can benefit from seamlessly authenticated transactions which may perform a \"frictionless\" flow. This method will authenticate low risk transactions with minimal impact to a standard authorisation flow. Our API simply performs this on behalf of you the developer, the merchant and cardholder. No redirection occurs and hence the flow is called frictionless and will appear as though a simple transaction authorisation has occurred. #### 3-D Secure - Challenge  A transaction that is deemed as higher risk my be \"challenged\". In this instance, 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). This should be performed by posting the [creq](#creq) value (the challenge request 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`. To maintain session state, a parameter `threeDSSessionData` can be posted to the ACS url and will be returned alongside the `CRes` value. This will ensure that any controller code will be able to isolate state between calls. This field is to be used by your own systems rather than ours and may be any value which can uniquely identify your cardholder's session. As an option, we do provide a `threedserver_trans_id` value in the `RequestChallenged` packet which can be used for the `threeDSSessionData` value as it is used to uniquely identify the 3D-Secure session. A common method of maintaining state is to provide a session related query string value in the `merchant_termurl` value (also known as the `notificationUrl`). For example providing a url of `https://mystore.com/checkout?token=asny2348w4561..` could return the user directly back to their session with your environment. Once you have received a `cres` post from the ACS authentication service, this should be POSTed to the [cres](#cres) endpoint to 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 response codes illustrating this. To forward the user to the ACS, we recommend a simple auto submit HTML form. > 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}}\" /> <input type=\"hidden\" name=\"threeDSSessionData\" value=\"{{session-identifier}}\" /> </form> </body> </html> ``` A full ACS test suite is available for 3DSv2 testing. ### Testing 3DSv2 Integrations The API provides a mock 3dsV2 handler which performs a number of scenarios based on the value of the CSC in the request. | CSC Value | Behaviour | |-----------|-----------| | 731 | Frictionless processing - Not authenticated | | 732 | Frictionless processing - Account verification count not be performed | | 733 | Frictionless processing - Verification Rejected | | 741 | Frictionless processing - Attempts Processing | | 750 | Frictionless processing - Authenticated | | 761 | Triggers an error message | | Any | Challenge Request | #### 3DSv1 **Please note that 3DSv1 should now be considered as deprecated.** ```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. > 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.
|
24
|
-
|
25
|
-
### Examples
|
26
|
-
|
27
|
-
```ruby
|
28
|
-
require 'time'
|
29
|
-
require 'citypay_api_client'
|
30
|
-
# setup authorization
|
31
|
-
CityPayApiClient.configure do |config|
|
32
|
-
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
33
|
-
end
|
34
|
-
|
35
|
-
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
36
|
-
auth_request = CityPayApiClient::AuthRequest.new({amount: 3600, cardnumber: '4000 0000 0000 0002', expmonth: 9, expyear: 2025, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344}) # AuthRequest |
|
37
|
-
|
38
|
-
begin
|
39
|
-
# Authorisation
|
40
|
-
result = api_instance.authorisation_request(auth_request)
|
41
|
-
p result
|
42
|
-
rescue CityPayApiClient::ApiError => e
|
43
|
-
puts "Error when calling PaymentProcessingApi->authorisation_request: #{e}"
|
44
|
-
end
|
45
|
-
```
|
46
|
-
|
47
|
-
#### Using the authorisation_request_with_http_info variant
|
48
|
-
|
49
|
-
This returns an Array which contains the response data, status code and headers.
|
50
|
-
|
51
|
-
> <Array(<Decision>, Integer, Hash)> authorisation_request_with_http_info(auth_request)
|
52
|
-
|
53
|
-
```ruby
|
54
|
-
begin
|
55
|
-
# Authorisation
|
56
|
-
data, status_code, headers = api_instance.authorisation_request_with_http_info(auth_request)
|
57
|
-
p status_code # => 2xx
|
58
|
-
p headers # => { ... }
|
59
|
-
p data # => <Decision>
|
60
|
-
rescue CityPayApiClient::ApiError => e
|
61
|
-
puts "Error when calling PaymentProcessingApi->authorisation_request_with_http_info: #{e}"
|
62
|
-
end
|
63
|
-
```
|
64
|
-
|
65
|
-
### Parameters
|
66
|
-
|
67
|
-
| Name | Type | Description | Notes |
|
68
|
-
| ---- | ---- | ----------- | ----- |
|
69
|
-
| **auth_request** | [**AuthRequest**](AuthRequest.md) | | |
|
70
|
-
|
71
|
-
### Return type
|
72
|
-
|
73
|
-
[**Decision**](Decision.md)
|
74
|
-
|
75
|
-
### Authorization
|
76
|
-
|
77
|
-
[cp-api-key](../README.md#cp-api-key)
|
78
|
-
|
79
|
-
### HTTP request headers
|
80
|
-
|
81
|
-
- **Content-Type**: application/json, text/xml
|
82
|
-
- **Accept**: application/json, text/xml
|
83
|
-
|
84
|
-
|
85
|
-
## bin_range_lookup_request
|
86
|
-
|
87
|
-
> <Bin> bin_range_lookup_request(bin_lookup)
|
88
|
-
|
89
|
-
Bin Lookup
|
90
|
-
|
91
|
-
A bin range lookup service can be used to check what a card is, as seen by the gateway. Each card number's leading digits help to identify who 0. the card scheme is such as Visa, MasterCard or American Express 1. the issuer of the card, such as the bank 2. it's country of origin 3. it's currency of origin Our gateway has 450 thousand possible bin ranges and uses a number of algorithms to determine the likelihood of the bin data. The request requires a bin value of between 6 and 12 digits. The more digits provided may ensure a more accurate result.
|
92
|
-
|
93
|
-
### Examples
|
94
|
-
|
95
|
-
```ruby
|
96
|
-
require 'time'
|
97
|
-
require 'citypay_api_client'
|
98
|
-
# setup authorization
|
99
|
-
CityPayApiClient.configure do |config|
|
100
|
-
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
101
|
-
end
|
102
|
-
|
103
|
-
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
104
|
-
bin_lookup = CityPayApiClient::BinLookup.new({bin: 543712}) # BinLookup |
|
105
|
-
|
106
|
-
begin
|
107
|
-
# Bin Lookup
|
108
|
-
result = api_instance.bin_range_lookup_request(bin_lookup)
|
109
|
-
p result
|
110
|
-
rescue CityPayApiClient::ApiError => e
|
111
|
-
puts "Error when calling PaymentProcessingApi->bin_range_lookup_request: #{e}"
|
112
|
-
end
|
113
|
-
```
|
114
|
-
|
115
|
-
#### Using the bin_range_lookup_request_with_http_info variant
|
116
|
-
|
117
|
-
This returns an Array which contains the response data, status code and headers.
|
118
|
-
|
119
|
-
> <Array(<Bin>, Integer, Hash)> bin_range_lookup_request_with_http_info(bin_lookup)
|
120
|
-
|
121
|
-
```ruby
|
122
|
-
begin
|
123
|
-
# Bin Lookup
|
124
|
-
data, status_code, headers = api_instance.bin_range_lookup_request_with_http_info(bin_lookup)
|
125
|
-
p status_code # => 2xx
|
126
|
-
p headers # => { ... }
|
127
|
-
p data # => <Bin>
|
128
|
-
rescue CityPayApiClient::ApiError => e
|
129
|
-
puts "Error when calling PaymentProcessingApi->bin_range_lookup_request_with_http_info: #{e}"
|
130
|
-
end
|
131
|
-
```
|
132
|
-
|
133
|
-
### Parameters
|
134
|
-
|
135
|
-
| Name | Type | Description | Notes |
|
136
|
-
| ---- | ---- | ----------- | ----- |
|
137
|
-
| **bin_lookup** | [**BinLookup**](BinLookup.md) | | |
|
138
|
-
|
139
|
-
### Return type
|
140
|
-
|
141
|
-
[**Bin**](Bin.md)
|
142
|
-
|
143
|
-
### Authorization
|
144
|
-
|
145
|
-
[cp-api-key](../README.md#cp-api-key)
|
146
|
-
|
147
|
-
### HTTP request headers
|
148
|
-
|
149
|
-
- **Content-Type**: application/json, text/xml
|
150
|
-
- **Accept**: application/json, text/xml
|
151
|
-
|
152
|
-
|
153
|
-
## c_res_request
|
154
|
-
|
155
|
-
> <AuthResponse> c_res_request(c_res_auth_request)
|
156
|
-
|
157
|
-
CRes
|
158
|
-
|
159
|
-
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.
|
160
|
-
|
161
|
-
### Examples
|
162
|
-
|
163
|
-
```ruby
|
164
|
-
require 'time'
|
165
|
-
require 'citypay_api_client'
|
166
|
-
# setup authorization
|
167
|
-
CityPayApiClient.configure do |config|
|
168
|
-
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
169
|
-
end
|
170
|
-
|
171
|
-
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
172
|
-
c_res_auth_request = CityPayApiClient::CResAuthRequest.new # CResAuthRequest |
|
173
|
-
|
174
|
-
begin
|
175
|
-
# CRes
|
176
|
-
result = api_instance.c_res_request(c_res_auth_request)
|
177
|
-
p result
|
178
|
-
rescue CityPayApiClient::ApiError => e
|
179
|
-
puts "Error when calling PaymentProcessingApi->c_res_request: #{e}"
|
180
|
-
end
|
181
|
-
```
|
182
|
-
|
183
|
-
#### Using the c_res_request_with_http_info variant
|
184
|
-
|
185
|
-
This returns an Array which contains the response data, status code and headers.
|
186
|
-
|
187
|
-
> <Array(<AuthResponse>, Integer, Hash)> c_res_request_with_http_info(c_res_auth_request)
|
188
|
-
|
189
|
-
```ruby
|
190
|
-
begin
|
191
|
-
# CRes
|
192
|
-
data, status_code, headers = api_instance.c_res_request_with_http_info(c_res_auth_request)
|
193
|
-
p status_code # => 2xx
|
194
|
-
p headers # => { ... }
|
195
|
-
p data # => <AuthResponse>
|
196
|
-
rescue CityPayApiClient::ApiError => e
|
197
|
-
puts "Error when calling PaymentProcessingApi->c_res_request_with_http_info: #{e}"
|
198
|
-
end
|
199
|
-
```
|
200
|
-
|
201
|
-
### Parameters
|
202
|
-
|
203
|
-
| Name | Type | Description | Notes |
|
204
|
-
| ---- | ---- | ----------- | ----- |
|
205
|
-
| **c_res_auth_request** | [**CResAuthRequest**](CResAuthRequest.md) | | |
|
206
|
-
|
207
|
-
### Return type
|
208
|
-
|
209
|
-
[**AuthResponse**](AuthResponse.md)
|
210
|
-
|
211
|
-
### Authorization
|
212
|
-
|
213
|
-
[cp-api-key](../README.md#cp-api-key)
|
214
|
-
|
215
|
-
### HTTP request headers
|
216
|
-
|
217
|
-
- **Content-Type**: application/json, text/xml
|
218
|
-
- **Accept**: application/json, text/xml
|
219
|
-
|
220
|
-
|
221
|
-
## capture_request
|
222
|
-
|
223
|
-
> <Acknowledgement> capture_request(capture_request)
|
224
|
-
|
225
|
-
Capture
|
226
|
-
|
227
|
-
_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.
|
228
|
-
|
229
|
-
### Examples
|
230
|
-
|
231
|
-
```ruby
|
232
|
-
require 'time'
|
233
|
-
require 'citypay_api_client'
|
234
|
-
# setup authorization
|
235
|
-
CityPayApiClient.configure do |config|
|
236
|
-
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
237
|
-
end
|
238
|
-
|
239
|
-
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
240
|
-
capture_request = CityPayApiClient::CaptureRequest.new({merchantid: 11223344}) # CaptureRequest |
|
241
|
-
|
242
|
-
begin
|
243
|
-
# Capture
|
244
|
-
result = api_instance.capture_request(capture_request)
|
245
|
-
p result
|
246
|
-
rescue CityPayApiClient::ApiError => e
|
247
|
-
puts "Error when calling PaymentProcessingApi->capture_request: #{e}"
|
248
|
-
end
|
249
|
-
```
|
250
|
-
|
251
|
-
#### Using the capture_request_with_http_info variant
|
252
|
-
|
253
|
-
This returns an Array which contains the response data, status code and headers.
|
254
|
-
|
255
|
-
> <Array(<Acknowledgement>, Integer, Hash)> capture_request_with_http_info(capture_request)
|
256
|
-
|
257
|
-
```ruby
|
258
|
-
begin
|
259
|
-
# Capture
|
260
|
-
data, status_code, headers = api_instance.capture_request_with_http_info(capture_request)
|
261
|
-
p status_code # => 2xx
|
262
|
-
p headers # => { ... }
|
263
|
-
p data # => <Acknowledgement>
|
264
|
-
rescue CityPayApiClient::ApiError => e
|
265
|
-
puts "Error when calling PaymentProcessingApi->capture_request_with_http_info: #{e}"
|
266
|
-
end
|
267
|
-
```
|
268
|
-
|
269
|
-
### Parameters
|
270
|
-
|
271
|
-
| Name | Type | Description | Notes |
|
272
|
-
| ---- | ---- | ----------- | ----- |
|
273
|
-
| **capture_request** | [**CaptureRequest**](CaptureRequest.md) | | |
|
274
|
-
|
275
|
-
### Return type
|
276
|
-
|
277
|
-
[**Acknowledgement**](Acknowledgement.md)
|
278
|
-
|
279
|
-
### Authorization
|
280
|
-
|
281
|
-
[cp-api-key](../README.md#cp-api-key)
|
282
|
-
|
283
|
-
### HTTP request headers
|
284
|
-
|
285
|
-
- **Content-Type**: application/json, text/xml
|
286
|
-
- **Accept**: application/json, text/xml
|
287
|
-
|
288
|
-
|
289
|
-
## pa_res_request
|
290
|
-
|
291
|
-
> <AuthResponse> pa_res_request(pa_res_auth_request)
|
292
|
-
|
293
|
-
PaRes
|
294
|
-
|
295
|
-
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.
|
296
|
-
|
297
|
-
### Examples
|
298
|
-
|
299
|
-
```ruby
|
300
|
-
require 'time'
|
301
|
-
require 'citypay_api_client'
|
302
|
-
# setup authorization
|
303
|
-
CityPayApiClient.configure do |config|
|
304
|
-
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
305
|
-
end
|
306
|
-
|
307
|
-
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
308
|
-
pa_res_auth_request = CityPayApiClient::PaResAuthRequest.new({md: 'md_example', pares: 'v66ycfSp8jNlvy7PkHbx44NEt3vox90+vZ/7Ll05Vid/jPfQn8adw+4D/vRDUGT19kndW97Hfirb...'}) # PaResAuthRequest |
|
309
|
-
|
310
|
-
begin
|
311
|
-
# PaRes
|
312
|
-
result = api_instance.pa_res_request(pa_res_auth_request)
|
313
|
-
p result
|
314
|
-
rescue CityPayApiClient::ApiError => e
|
315
|
-
puts "Error when calling PaymentProcessingApi->pa_res_request: #{e}"
|
316
|
-
end
|
317
|
-
```
|
318
|
-
|
319
|
-
#### Using the pa_res_request_with_http_info variant
|
320
|
-
|
321
|
-
This returns an Array which contains the response data, status code and headers.
|
322
|
-
|
323
|
-
> <Array(<AuthResponse>, Integer, Hash)> pa_res_request_with_http_info(pa_res_auth_request)
|
324
|
-
|
325
|
-
```ruby
|
326
|
-
begin
|
327
|
-
# PaRes
|
328
|
-
data, status_code, headers = api_instance.pa_res_request_with_http_info(pa_res_auth_request)
|
329
|
-
p status_code # => 2xx
|
330
|
-
p headers # => { ... }
|
331
|
-
p data # => <AuthResponse>
|
332
|
-
rescue CityPayApiClient::ApiError => e
|
333
|
-
puts "Error when calling PaymentProcessingApi->pa_res_request_with_http_info: #{e}"
|
334
|
-
end
|
335
|
-
```
|
336
|
-
|
337
|
-
### Parameters
|
338
|
-
|
339
|
-
| Name | Type | Description | Notes |
|
340
|
-
| ---- | ---- | ----------- | ----- |
|
341
|
-
| **pa_res_auth_request** | [**PaResAuthRequest**](PaResAuthRequest.md) | | |
|
342
|
-
|
343
|
-
### Return type
|
344
|
-
|
345
|
-
[**AuthResponse**](AuthResponse.md)
|
346
|
-
|
347
|
-
### Authorization
|
348
|
-
|
349
|
-
[cp-api-key](../README.md#cp-api-key)
|
350
|
-
|
351
|
-
### HTTP request headers
|
352
|
-
|
353
|
-
- **Content-Type**: application/json, text/xml
|
354
|
-
- **Accept**: application/json, text/xml
|
355
|
-
|
356
|
-
|
357
|
-
## refund_request
|
358
|
-
|
359
|
-
> <AuthResponse> refund_request(refund_request)
|
360
|
-
|
361
|
-
Refund
|
362
|
-
|
363
|
-
A refund request which allows for the refunding of a previous transaction up and to the amount of the original sale. A refund will be performed against the original card used to process the transaction.
|
364
|
-
|
365
|
-
### Examples
|
366
|
-
|
367
|
-
```ruby
|
368
|
-
require 'time'
|
369
|
-
require 'citypay_api_client'
|
370
|
-
# setup authorization
|
371
|
-
CityPayApiClient.configure do |config|
|
372
|
-
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
373
|
-
end
|
374
|
-
|
375
|
-
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
376
|
-
refund_request = CityPayApiClient::RefundRequest.new({amount: 3600, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344, refund_ref: 8322}) # RefundRequest |
|
377
|
-
|
378
|
-
begin
|
379
|
-
# Refund
|
380
|
-
result = api_instance.refund_request(refund_request)
|
381
|
-
p result
|
382
|
-
rescue CityPayApiClient::ApiError => e
|
383
|
-
puts "Error when calling PaymentProcessingApi->refund_request: #{e}"
|
384
|
-
end
|
385
|
-
```
|
386
|
-
|
387
|
-
#### Using the refund_request_with_http_info variant
|
388
|
-
|
389
|
-
This returns an Array which contains the response data, status code and headers.
|
390
|
-
|
391
|
-
> <Array(<AuthResponse>, Integer, Hash)> refund_request_with_http_info(refund_request)
|
392
|
-
|
393
|
-
```ruby
|
394
|
-
begin
|
395
|
-
# Refund
|
396
|
-
data, status_code, headers = api_instance.refund_request_with_http_info(refund_request)
|
397
|
-
p status_code # => 2xx
|
398
|
-
p headers # => { ... }
|
399
|
-
p data # => <AuthResponse>
|
400
|
-
rescue CityPayApiClient::ApiError => e
|
401
|
-
puts "Error when calling PaymentProcessingApi->refund_request_with_http_info: #{e}"
|
402
|
-
end
|
403
|
-
```
|
404
|
-
|
405
|
-
### Parameters
|
406
|
-
|
407
|
-
| Name | Type | Description | Notes |
|
408
|
-
| ---- | ---- | ----------- | ----- |
|
409
|
-
| **refund_request** | [**RefundRequest**](RefundRequest.md) | | |
|
410
|
-
|
411
|
-
### Return type
|
412
|
-
|
413
|
-
[**AuthResponse**](AuthResponse.md)
|
414
|
-
|
415
|
-
### Authorization
|
416
|
-
|
417
|
-
[cp-api-key](../README.md#cp-api-key)
|
418
|
-
|
419
|
-
### HTTP request headers
|
420
|
-
|
421
|
-
- **Content-Type**: application/json, text/xml
|
422
|
-
- **Accept**: application/json, text/xml
|
423
|
-
|
424
|
-
|
425
|
-
## retrieval_request
|
426
|
-
|
427
|
-
> <AuthReferences> retrieval_request(retrieve_request)
|
428
|
-
|
429
|
-
Retrieval
|
430
|
-
|
431
|
-
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.
|
432
|
-
|
433
|
-
### Examples
|
434
|
-
|
435
|
-
```ruby
|
436
|
-
require 'time'
|
437
|
-
require 'citypay_api_client'
|
438
|
-
# setup authorization
|
439
|
-
CityPayApiClient.configure do |config|
|
440
|
-
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
441
|
-
end
|
442
|
-
|
443
|
-
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
444
|
-
retrieve_request = CityPayApiClient::RetrieveRequest.new({merchantid: 11223344}) # RetrieveRequest |
|
445
|
-
|
446
|
-
begin
|
447
|
-
# Retrieval
|
448
|
-
result = api_instance.retrieval_request(retrieve_request)
|
449
|
-
p result
|
450
|
-
rescue CityPayApiClient::ApiError => e
|
451
|
-
puts "Error when calling PaymentProcessingApi->retrieval_request: #{e}"
|
452
|
-
end
|
453
|
-
```
|
454
|
-
|
455
|
-
#### Using the retrieval_request_with_http_info variant
|
456
|
-
|
457
|
-
This returns an Array which contains the response data, status code and headers.
|
458
|
-
|
459
|
-
> <Array(<AuthReferences>, Integer, Hash)> retrieval_request_with_http_info(retrieve_request)
|
460
|
-
|
461
|
-
```ruby
|
462
|
-
begin
|
463
|
-
# Retrieval
|
464
|
-
data, status_code, headers = api_instance.retrieval_request_with_http_info(retrieve_request)
|
465
|
-
p status_code # => 2xx
|
466
|
-
p headers # => { ... }
|
467
|
-
p data # => <AuthReferences>
|
468
|
-
rescue CityPayApiClient::ApiError => e
|
469
|
-
puts "Error when calling PaymentProcessingApi->retrieval_request_with_http_info: #{e}"
|
470
|
-
end
|
471
|
-
```
|
472
|
-
|
473
|
-
### Parameters
|
474
|
-
|
475
|
-
| Name | Type | Description | Notes |
|
476
|
-
| ---- | ---- | ----------- | ----- |
|
477
|
-
| **retrieve_request** | [**RetrieveRequest**](RetrieveRequest.md) | | |
|
478
|
-
|
479
|
-
### Return type
|
480
|
-
|
481
|
-
[**AuthReferences**](AuthReferences.md)
|
482
|
-
|
483
|
-
### Authorization
|
484
|
-
|
485
|
-
[cp-api-key](../README.md#cp-api-key)
|
486
|
-
|
487
|
-
### HTTP request headers
|
488
|
-
|
489
|
-
- **Content-Type**: application/json, text/xml
|
490
|
-
- **Accept**: application/json, text/xml
|
491
|
-
|
492
|
-
|
493
|
-
## void_request
|
494
|
-
|
495
|
-
> <Acknowledgement> void_request(void_request)
|
496
|
-
|
497
|
-
Void
|
498
|
-
|
499
|
-
_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.
|
500
|
-
|
501
|
-
### Examples
|
502
|
-
|
503
|
-
```ruby
|
504
|
-
require 'time'
|
505
|
-
require 'citypay_api_client'
|
506
|
-
# setup authorization
|
507
|
-
CityPayApiClient.configure do |config|
|
508
|
-
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
509
|
-
end
|
510
|
-
|
511
|
-
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
512
|
-
void_request = CityPayApiClient::VoidRequest.new({merchantid: 11223344}) # VoidRequest |
|
513
|
-
|
514
|
-
begin
|
515
|
-
# Void
|
516
|
-
result = api_instance.void_request(void_request)
|
517
|
-
p result
|
518
|
-
rescue CityPayApiClient::ApiError => e
|
519
|
-
puts "Error when calling PaymentProcessingApi->void_request: #{e}"
|
520
|
-
end
|
521
|
-
```
|
522
|
-
|
523
|
-
#### Using the void_request_with_http_info variant
|
524
|
-
|
525
|
-
This returns an Array which contains the response data, status code and headers.
|
526
|
-
|
527
|
-
> <Array(<Acknowledgement>, Integer, Hash)> void_request_with_http_info(void_request)
|
528
|
-
|
529
|
-
```ruby
|
530
|
-
begin
|
531
|
-
# Void
|
532
|
-
data, status_code, headers = api_instance.void_request_with_http_info(void_request)
|
533
|
-
p status_code # => 2xx
|
534
|
-
p headers # => { ... }
|
535
|
-
p data # => <Acknowledgement>
|
536
|
-
rescue CityPayApiClient::ApiError => e
|
537
|
-
puts "Error when calling PaymentProcessingApi->void_request_with_http_info: #{e}"
|
538
|
-
end
|
539
|
-
```
|
540
|
-
|
541
|
-
### Parameters
|
542
|
-
|
543
|
-
| Name | Type | Description | Notes |
|
544
|
-
| ---- | ---- | ----------- | ----- |
|
545
|
-
| **void_request** | [**VoidRequest**](VoidRequest.md) | | |
|
546
|
-
|
547
|
-
### Return type
|
548
|
-
|
549
|
-
[**Acknowledgement**](Acknowledgement.md)
|
550
|
-
|
551
|
-
### Authorization
|
552
|
-
|
553
|
-
[cp-api-key](../README.md#cp-api-key)
|
554
|
-
|
555
|
-
### HTTP request headers
|
556
|
-
|
557
|
-
- **Content-Type**: application/json, text/xml
|
558
|
-
- **Accept**: application/json, text/xml
|
559
|
-
|