citypay_api_client 1.0.0
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +176 -0
- data/Rakefile +10 -0
- data/citypay_api_client.gemspec +39 -0
- data/docs/AccountCreate.md +19 -0
- data/docs/AccountStatus.md +17 -0
- data/docs/Acknowledgement.md +23 -0
- data/docs/AirlineAdvice.md +47 -0
- data/docs/AirlineSegment.md +31 -0
- data/docs/AuthReference.md +43 -0
- data/docs/AuthReferences.md +17 -0
- data/docs/AuthRequest.md +59 -0
- data/docs/AuthResponse.md +69 -0
- data/docs/AuthenRequired.md +21 -0
- data/docs/CResAuthRequest.md +17 -0
- data/docs/CaptureRequest.md +27 -0
- data/docs/Card.md +51 -0
- data/docs/CardHolderAccount.md +31 -0
- data/docs/CardHolderAccountApi.md +515 -0
- data/docs/CardStatus.md +19 -0
- data/docs/ChargeRequest.md +41 -0
- data/docs/ContactDetails.md +41 -0
- data/docs/Decision.md +21 -0
- data/docs/Error.md +23 -0
- data/docs/ExternalMPI.md +25 -0
- data/docs/ListMerchantsResponse.md +21 -0
- data/docs/MCC6012.md +23 -0
- data/docs/Merchant.md +25 -0
- data/docs/OperationalApi.md +118 -0
- data/docs/PaResAuthRequest.md +19 -0
- data/docs/PaymentProcessingApi.md +338 -0
- data/docs/Ping.md +17 -0
- data/docs/RegisterCard.md +23 -0
- data/docs/RequestChallenged.md +25 -0
- data/docs/RetrieveRequest.md +21 -0
- data/docs/ThreeDSecure.md +25 -0
- data/docs/VoidRequest.md +23 -0
- data/git_push.sh +58 -0
- data/lib/citypay_api_client.rb +72 -0
- data/lib/citypay_api_client/api/card_holder_account_api.rb +628 -0
- data/lib/citypay_api_client/api/operational_api.rb +148 -0
- data/lib/citypay_api_client/api/payment_processing_api.rb +406 -0
- data/lib/citypay_api_client/api_client.rb +388 -0
- data/lib/citypay_api_client/api_error.rb +57 -0
- data/lib/citypay_api_client/configuration.rb +252 -0
- data/lib/citypay_api_client/models/account_create.rb +249 -0
- data/lib/citypay_api_client/models/account_status.rb +207 -0
- data/lib/citypay_api_client/models/acknowledgement.rb +285 -0
- data/lib/citypay_api_client/models/airline_advice.rb +551 -0
- data/lib/citypay_api_client/models/airline_segment.rb +408 -0
- data/lib/citypay_api_client/models/api_key.rb +53 -0
- data/lib/citypay_api_client/models/auth_reference.rb +400 -0
- data/lib/citypay_api_client/models/auth_references.rb +208 -0
- data/lib/citypay_api_client/models/auth_request.rb +631 -0
- data/lib/citypay_api_client/models/auth_response.rb +563 -0
- data/lib/citypay_api_client/models/authen_required.rb +227 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +207 -0
- data/lib/citypay_api_client/models/capture_request.rb +285 -0
- data/lib/citypay_api_client/models/card.rb +425 -0
- data/lib/citypay_api_client/models/card_holder_account.rb +315 -0
- data/lib/citypay_api_client/models/card_status.rb +217 -0
- data/lib/citypay_api_client/models/charge_request.rb +453 -0
- data/lib/citypay_api_client/models/contact_details.rb +456 -0
- data/lib/citypay_api_client/models/decision.rb +224 -0
- data/lib/citypay_api_client/models/error.rb +285 -0
- data/lib/citypay_api_client/models/external_mpi.rb +307 -0
- data/lib/citypay_api_client/models/list_merchants_response.rb +252 -0
- data/lib/citypay_api_client/models/mcc6012.rb +237 -0
- data/lib/citypay_api_client/models/merchant.rb +247 -0
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +227 -0
- data/lib/citypay_api_client/models/ping.rb +231 -0
- data/lib/citypay_api_client/models/register_card.rb +336 -0
- data/lib/citypay_api_client/models/request_challenged.rb +247 -0
- data/lib/citypay_api_client/models/retrieve_request.rb +256 -0
- data/lib/citypay_api_client/models/three_d_secure.rb +247 -0
- data/lib/citypay_api_client/models/void_request.rb +266 -0
- data/lib/citypay_api_client/version.rb +15 -0
- data/spec/api/card_holder_account_api_spec.rb +149 -0
- data/spec/api/operational_api_spec.rb +59 -0
- data/spec/api/payment_processing_api_spec.rb +107 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_create_spec.rb +47 -0
- data/spec/models/account_status_spec.rb +41 -0
- data/spec/models/acknowledgement_spec.rb +59 -0
- data/spec/models/airline_advice_spec.rb +131 -0
- data/spec/models/airline_segment_spec.rb +83 -0
- data/spec/models/auth_reference_spec.rb +119 -0
- data/spec/models/auth_references_spec.rb +41 -0
- data/spec/models/auth_request_spec.rb +167 -0
- data/spec/models/auth_response_spec.rb +197 -0
- data/spec/models/authen_required_spec.rb +53 -0
- data/spec/models/c_res_auth_request_spec.rb +41 -0
- data/spec/models/capture_request_spec.rb +71 -0
- data/spec/models/card_holder_account_spec.rb +83 -0
- data/spec/models/card_spec.rb +143 -0
- data/spec/models/card_status_spec.rb +47 -0
- data/spec/models/charge_request_spec.rb +113 -0
- data/spec/models/contact_details_spec.rb +113 -0
- data/spec/models/decision_spec.rb +53 -0
- data/spec/models/error_spec.rb +59 -0
- data/spec/models/external_mpi_spec.rb +65 -0
- data/spec/models/list_merchants_response_spec.rb +53 -0
- data/spec/models/mcc6012_spec.rb +59 -0
- data/spec/models/merchant_spec.rb +65 -0
- data/spec/models/pa_res_auth_request_spec.rb +47 -0
- data/spec/models/ping_spec.rb +41 -0
- data/spec/models/register_card_spec.rb +59 -0
- data/spec/models/request_challenged_spec.rb +65 -0
- data/spec/models/retrieve_request_spec.rb +53 -0
- data/spec/models/three_d_secure_spec.rb +65 -0
- data/spec/models/void_request_spec.rb +59 -0
- data/spec/spec_helper.rb +111 -0
- metadata +252 -0
data/docs/CardStatus.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# CityPayApiClient::CardStatus
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**card_status** | **String** | The status of the card to set, valid values are ACTIVE or INACTIVE. | [optional]
|
8
|
+
**default** | **Boolean** | Defines if the card is set as the default. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'CityPayApiClient'
|
14
|
+
|
15
|
+
instance = CityPayApiClient::CardStatus.new(card_status: null,
|
16
|
+
default: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# CityPayApiClient::ChargeRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**amount** | **Integer** | The amount to authorise in the lowest unit of currency with a variable length to a maximum of 12 digits. No decimal points are to be included and no divisional characters such as 1,024. The amount should be the total amount required for the transaction. For example with GBP £1,021.95 the amount value is 102195. |
|
8
|
+
**avs_postcode_policy** | **String** | A policy value which determines whether an AVS postcode policy is enforced or bypassed. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the AVS postcode numeric value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the postcode did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send postcode details for authorisation. | [optional]
|
9
|
+
**csc** | **String** | The Card Security Code (CSC) (also known as CV2/CVV2) is normally found on the back of the card (American Express has it on the front). The value helps to identify posession of the card as it is not available within the chip or magnetic swipe. When forwarding the CSC, please ensure the value is a string as some values start with 0 and this will be stripped out by any integer parsing. The CSC number aids fraud prevention in Mail Order and Internet payments. Business rules are available on your account to identify whether to accept or decline transactions based on mismatched results of the CSC. The Payment Card Industry (PCI) requires that at no stage of a transaction should the CSC be stored. This applies to all entities handling card data. It should also not be used in any hashing process. CityPay do not store the value and have no method of retrieving the value once the transaction has been processed. For this reason, duplicate checking is unable to determine the CSC in its duplication check algorithm. | [optional]
|
10
|
+
**csc_policy** | **String** | A policy value which determines whether a CSC policy is enforced or bypassed. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the CSC value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the CSC did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send the CSC details for authorisation. | [optional]
|
11
|
+
**currency** | **String** | The processing currency for the transaction. Will default to the merchant account currency. | [optional]
|
12
|
+
**duplicate_policy** | **String** | A policy value which determines whether a duplication policy is enforced or bypassed. A duplication check has a window of time set against your account within which it can action. If a previous transaction with matching values occurred within the window, any subsequent transaction will result in a T001 result. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be checked for duplication within the duplication window. `2` to bypass. Transactions that are bypassed will not be checked for duplication within the duplication window. `3` to ignore. Transactions that are ignored will have the same affect as bypass. | [optional]
|
13
|
+
**identifier** | **String** | The identifier of the transaction to process. The value should be a valid reference and may be used to perform post processing actions and to aid in reconciliation of transactions. The value should be a valid printable string with ASCII character ranges from 32 to 127. The identifier is recommended to be distinct for each transaction such as a [random unique identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier) this will aid in ensuring each transaction is identifiable. When transactions are processed they are also checked for duplicate requests. Changing the identifier on a subsequent request will ensure that a transaction is considered as different. |
|
14
|
+
**match_avsa** | **String** | A policy value which determines whether an AVS address policy is enforced, bypassed or ignored. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the AVS address numeric value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the address did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send address numeric details for authorisation. | [optional]
|
15
|
+
**merchantid** | **Integer** | Identifies the merchant account to perform processing for. |
|
16
|
+
**sdk** | **String** | An optional reference value for the calling client such as a version number i.e. | [optional]
|
17
|
+
**token** | **String** | A tokenised form of a card that belongs to a card holder's account and that has been previously registered. The token is time based and will only be active for a short duration. The value is therefore designed not to be stored remotely for future use. Tokens will start with ct and are resiliently tamper proof using HMacSHA-256. No sensitive card data is stored internally within the token. Each card will contain a different token and the value may be different on any retrieval call. The value can be presented for payment as a selection value to an end user in a web application. |
|
18
|
+
**trans_info** | **String** | Further information that can be added to the transaction will display in reporting. Can be used for flexible values such as operator id. | [optional]
|
19
|
+
**trans_type** | **String** | The type of transaction being submitted. Normally this value is not required and your account manager may request that you set this field. | [optional]
|
20
|
+
|
21
|
+
## Code Sample
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'CityPayApiClient'
|
25
|
+
|
26
|
+
instance = CityPayApiClient::ChargeRequest.new(amount: 3600,
|
27
|
+
avs_postcode_policy: null,
|
28
|
+
csc: 12,
|
29
|
+
csc_policy: null,
|
30
|
+
currency: GBP,
|
31
|
+
duplicate_policy: null,
|
32
|
+
identifier: 95b857a1-5955-4b86-963c-5a6dbfc4fb95,
|
33
|
+
match_avsa: null,
|
34
|
+
merchantid: 11223344,
|
35
|
+
sdk: MyClient 1.3.0,
|
36
|
+
token: ctPCAPyNyCkx3Ry8wGyv8khC3ch2hUSB3Db..Qzr,
|
37
|
+
trans_info: null,
|
38
|
+
trans_type: null)
|
39
|
+
```
|
40
|
+
|
41
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# CityPayApiClient::ContactDetails
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**address1** | **String** | The first line of the address for the card holder. | [optional]
|
8
|
+
**address2** | **String** | The second line of the address for the card holder. | [optional]
|
9
|
+
**address3** | **String** | The third line of the address for the card holder. | [optional]
|
10
|
+
**area** | **String** | The area such as city, department, parish for the card holder. | [optional]
|
11
|
+
**company** | **String** | The company name for the card holder if the contact is a corporate contact. | [optional]
|
12
|
+
**country** | **String** | The country code in ISO 3166 format. The country value may be used for fraud analysis and for acceptance of the transaction. | [optional]
|
13
|
+
**email** | **String** | An email address for the card holder which may be used for correspondence. | [optional]
|
14
|
+
**firstname** | **String** | The first name of the card holder. | [optional]
|
15
|
+
**lastname** | **String** | The last name or surname of the card holder. | [optional]
|
16
|
+
**mobile_no** | **String** | A mobile number for the card holder the mobile number is often required by delivery companies to ensure they are able to be in contact when required. | [optional]
|
17
|
+
**postcode** | **String** | The postcode or zip code of the address which may be used for fraud analysis. | [optional]
|
18
|
+
**telephone_no** | **String** | A telephone number for the card holder. | [optional]
|
19
|
+
**title** | **String** | A title for the card holder such as Mr, Mrs, Ms, M. Mme. etc. | [optional]
|
20
|
+
|
21
|
+
## Code Sample
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'CityPayApiClient'
|
25
|
+
|
26
|
+
instance = CityPayApiClient::ContactDetails.new(address1: 79 Parliament St,
|
27
|
+
address2: Westminster,
|
28
|
+
address3: null,
|
29
|
+
area: London,
|
30
|
+
company: Acme Ltd,
|
31
|
+
country: GB,
|
32
|
+
email: card.holder@citypay.com,
|
33
|
+
firstname: John,
|
34
|
+
lastname: Smith,
|
35
|
+
mobile_no: 447790123456,
|
36
|
+
postcode: L1 789,
|
37
|
+
telephone_no: 442030123456,
|
38
|
+
title: Mr)
|
39
|
+
```
|
40
|
+
|
41
|
+
|
data/docs/Decision.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# CityPayApiClient::Decision
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**authentication** | [**AuthenRequired**](AuthenRequired.md) | | [optional]
|
8
|
+
**challenge** | [**RequestChallenged**](RequestChallenged.md) | | [optional]
|
9
|
+
**result** | [**AuthResponse**](AuthResponse.md) | | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'CityPayApiClient'
|
15
|
+
|
16
|
+
instance = CityPayApiClient::Decision.new(authentication: null,
|
17
|
+
challenge: null,
|
18
|
+
result: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/Error.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# CityPayApiClient::Error
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**code** | **String** | A response code providing a result of the process. | [optional]
|
8
|
+
**context** | **String** | A context id of the process used for referencing transactions through support. | [optional]
|
9
|
+
**identifier** | **String** | An identifier if presented in the original request. | [optional]
|
10
|
+
**message** | **String** | A response message providing a description of the result of the process. | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'CityPayApiClient'
|
16
|
+
|
17
|
+
instance = CityPayApiClient::Error.new(code: 0,
|
18
|
+
context: aspiu352908ns47n343598bads,
|
19
|
+
identifier: 95b857a1-5955-4b86-963c-5a6dbfc4fb95,
|
20
|
+
message: Approved 044332)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
data/docs/ExternalMPI.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# CityPayApiClient::ExternalMPI
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**authen_result** | **String** | The authentication result available from the MPI. | [optional]
|
8
|
+
**cavv** | **String** | A value determining the cardholder verification value supplied by the card scheme. | [optional]
|
9
|
+
**eci** | **Integer** | The obtained e-commerce indicator from the MPI. | [optional]
|
10
|
+
**enrolled** | **String** | A value determining whether the card holder was enrolled. | [optional]
|
11
|
+
**xid** | **String** | The XID used for processing with the MPI. | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'CityPayApiClient'
|
17
|
+
|
18
|
+
instance = CityPayApiClient::ExternalMPI.new(authen_result: null,
|
19
|
+
cavv: null,
|
20
|
+
eci: null,
|
21
|
+
enrolled: null,
|
22
|
+
xid: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# CityPayApiClient::ListMerchantsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**client_name** | **String** | The client name that was requested. | [optional]
|
8
|
+
**clientid** | **String** | The client id requested. | [optional]
|
9
|
+
**merchants** | [**Array<Merchant>**](Merchant.md) | | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'CityPayApiClient'
|
15
|
+
|
16
|
+
instance = CityPayApiClient::ListMerchantsResponse.new(client_name: null,
|
17
|
+
clientid: PC12345,
|
18
|
+
merchants: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/MCC6012.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# CityPayApiClient::MCC6012
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**recipient_account** | **String** | The account number of the recipient. | [optional]
|
8
|
+
**recipient_dob** | **String** | The date of birth of the recipient. | [optional]
|
9
|
+
**recipient_lastname** | **String** | The lastname of ther recepient. | [optional]
|
10
|
+
**recipient_postcode** | **String** | The postcode of the recipient. | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'CityPayApiClient'
|
16
|
+
|
17
|
+
instance = CityPayApiClient::MCC6012.new(recipient_account: null,
|
18
|
+
recipient_dob: null,
|
19
|
+
recipient_lastname: null,
|
20
|
+
recipient_postcode: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
data/docs/Merchant.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# CityPayApiClient::Merchant
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**currency** | **String** | The currency of the merchant. | [optional]
|
8
|
+
**merchantid** | **Integer** | The merchant id which uniquely identifies the merchant account. | [optional]
|
9
|
+
**name** | **String** | The name of the merchant. | [optional]
|
10
|
+
**status** | **String** | The status of the account. | [optional]
|
11
|
+
**status_label** | **String** | The status label of the account. | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'CityPayApiClient'
|
17
|
+
|
18
|
+
instance = CityPayApiClient::Merchant.new(currency: GBP,
|
19
|
+
merchantid: 11223344,
|
20
|
+
name: Merchant 1,
|
21
|
+
status: A,
|
22
|
+
status_label: Active)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,118 @@
|
|
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
|
+
# Configure API key authorization: cp-api-key
|
28
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
30
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = CityPayApiClient::OperationalApi.new
|
34
|
+
clientid = 'clientid_example' # String | The client id to return merchants for, specifying \"default\" will use the value in your api key.
|
35
|
+
|
36
|
+
begin
|
37
|
+
#List Merchants Request
|
38
|
+
result = api_instance.list_merchants_request(clientid)
|
39
|
+
p result
|
40
|
+
rescue CityPayApiClient::ApiError => e
|
41
|
+
puts "Exception when calling OperationalApi->list_merchants_request: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
### Parameters
|
46
|
+
|
47
|
+
|
48
|
+
Name | Type | Description | Notes
|
49
|
+
------------- | ------------- | ------------- | -------------
|
50
|
+
**clientid** | **String**| The client id to return merchants for, specifying \"default\" will use the value in your api key. |
|
51
|
+
|
52
|
+
### Return type
|
53
|
+
|
54
|
+
[**ListMerchantsResponse**](ListMerchantsResponse.md)
|
55
|
+
|
56
|
+
### Authorization
|
57
|
+
|
58
|
+
[cp-api-key](../README.md#cp-api-key)
|
59
|
+
|
60
|
+
### HTTP request headers
|
61
|
+
|
62
|
+
- **Content-Type**: Not defined
|
63
|
+
- **Accept**: application/json, text/xml
|
64
|
+
|
65
|
+
|
66
|
+
## ping_request
|
67
|
+
|
68
|
+
> Acknowledgement ping_request(ping)
|
69
|
+
|
70
|
+
Ping Request
|
71
|
+
|
72
|
+
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.
|
73
|
+
|
74
|
+
### Example
|
75
|
+
|
76
|
+
```ruby
|
77
|
+
# load the gem
|
78
|
+
require 'citypay_api_client'
|
79
|
+
# setup authorization
|
80
|
+
CityPayApiClient.configure do |config|
|
81
|
+
# Configure API key authorization: cp-api-key
|
82
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
83
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
84
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
85
|
+
end
|
86
|
+
|
87
|
+
api_instance = CityPayApiClient::OperationalApi.new
|
88
|
+
ping = CityPayApiClient::Ping.new # Ping |
|
89
|
+
|
90
|
+
begin
|
91
|
+
#Ping Request
|
92
|
+
result = api_instance.ping_request(ping)
|
93
|
+
p result
|
94
|
+
rescue CityPayApiClient::ApiError => e
|
95
|
+
puts "Exception when calling OperationalApi->ping_request: #{e}"
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
### Parameters
|
100
|
+
|
101
|
+
|
102
|
+
Name | Type | Description | Notes
|
103
|
+
------------- | ------------- | ------------- | -------------
|
104
|
+
**ping** | [**Ping**](Ping.md)| |
|
105
|
+
|
106
|
+
### Return type
|
107
|
+
|
108
|
+
[**Acknowledgement**](Acknowledgement.md)
|
109
|
+
|
110
|
+
### Authorization
|
111
|
+
|
112
|
+
[cp-api-key](../README.md#cp-api-key)
|
113
|
+
|
114
|
+
### HTTP request headers
|
115
|
+
|
116
|
+
- **Content-Type**: application/json, text/xml
|
117
|
+
- **Accept**: application/json, text/xml
|
118
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# CityPayApiClient::PaResAuthRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**md** | **String** | The Merchant Data (MD) which is a unique ID to reference the authentication session. This value will be created by CityPay when required. When responding from the ACS, this value will be returned by the ACS. |
|
8
|
+
**pares** | **String** | The Payer Authentication Response packet which is returned by the ACS containing the response of the authentication session including verification values. The response is a base64 encoded packet and should be forwarded to CityPay untouched. |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'CityPayApiClient'
|
14
|
+
|
15
|
+
instance = CityPayApiClient::PaResAuthRequest.new(md: null,
|
16
|
+
pares: v66ycfSp8jNlvy7PkHbx44NEt3vox90+vZ/7Ll05Vid/jPfQn8adw+4D/vRDUGT19kndW97Hfirb...)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,338 @@
|
|
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
|
+
# Configure API key authorization: cp-api-key
|
32
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
33
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
34
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
35
|
+
end
|
36
|
+
|
37
|
+
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
38
|
+
auth_request = CityPayApiClient::AuthRequest.new # AuthRequest |
|
39
|
+
|
40
|
+
begin
|
41
|
+
#Authorisation
|
42
|
+
result = api_instance.authorisation_request(auth_request)
|
43
|
+
p result
|
44
|
+
rescue CityPayApiClient::ApiError => e
|
45
|
+
puts "Exception when calling PaymentProcessingApi->authorisation_request: #{e}"
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
### Parameters
|
50
|
+
|
51
|
+
|
52
|
+
Name | Type | Description | Notes
|
53
|
+
------------- | ------------- | ------------- | -------------
|
54
|
+
**auth_request** | [**AuthRequest**](AuthRequest.md)| |
|
55
|
+
|
56
|
+
### Return type
|
57
|
+
|
58
|
+
[**Decision**](Decision.md)
|
59
|
+
|
60
|
+
### Authorization
|
61
|
+
|
62
|
+
[cp-api-key](../README.md#cp-api-key)
|
63
|
+
|
64
|
+
### HTTP request headers
|
65
|
+
|
66
|
+
- **Content-Type**: application/json, text/xml
|
67
|
+
- **Accept**: application/json, text/xml
|
68
|
+
|
69
|
+
|
70
|
+
## c_res_request
|
71
|
+
|
72
|
+
> AuthResponse c_res_request(c_res_auth_request)
|
73
|
+
|
74
|
+
CRes
|
75
|
+
|
76
|
+
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.
|
77
|
+
|
78
|
+
### Example
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
# load the gem
|
82
|
+
require 'citypay_api_client'
|
83
|
+
# setup authorization
|
84
|
+
CityPayApiClient.configure do |config|
|
85
|
+
# Configure API key authorization: cp-api-key
|
86
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
87
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
88
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
89
|
+
end
|
90
|
+
|
91
|
+
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
92
|
+
c_res_auth_request = CityPayApiClient::CResAuthRequest.new # CResAuthRequest |
|
93
|
+
|
94
|
+
begin
|
95
|
+
#CRes
|
96
|
+
result = api_instance.c_res_request(c_res_auth_request)
|
97
|
+
p result
|
98
|
+
rescue CityPayApiClient::ApiError => e
|
99
|
+
puts "Exception when calling PaymentProcessingApi->c_res_request: #{e}"
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
103
|
+
### Parameters
|
104
|
+
|
105
|
+
|
106
|
+
Name | Type | Description | Notes
|
107
|
+
------------- | ------------- | ------------- | -------------
|
108
|
+
**c_res_auth_request** | [**CResAuthRequest**](CResAuthRequest.md)| |
|
109
|
+
|
110
|
+
### Return type
|
111
|
+
|
112
|
+
[**AuthResponse**](AuthResponse.md)
|
113
|
+
|
114
|
+
### Authorization
|
115
|
+
|
116
|
+
[cp-api-key](../README.md#cp-api-key)
|
117
|
+
|
118
|
+
### HTTP request headers
|
119
|
+
|
120
|
+
- **Content-Type**: application/json, text/xml
|
121
|
+
- **Accept**: application/json, text/xml
|
122
|
+
|
123
|
+
|
124
|
+
## capture_request
|
125
|
+
|
126
|
+
> Acknowledgement capture_request(capture_request)
|
127
|
+
|
128
|
+
Capture
|
129
|
+
|
130
|
+
_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.
|
131
|
+
|
132
|
+
### Example
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
# load the gem
|
136
|
+
require 'citypay_api_client'
|
137
|
+
# setup authorization
|
138
|
+
CityPayApiClient.configure do |config|
|
139
|
+
# Configure API key authorization: cp-api-key
|
140
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
141
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
142
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
143
|
+
end
|
144
|
+
|
145
|
+
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
146
|
+
capture_request = CityPayApiClient::CaptureRequest.new # CaptureRequest |
|
147
|
+
|
148
|
+
begin
|
149
|
+
#Capture
|
150
|
+
result = api_instance.capture_request(capture_request)
|
151
|
+
p result
|
152
|
+
rescue CityPayApiClient::ApiError => e
|
153
|
+
puts "Exception when calling PaymentProcessingApi->capture_request: #{e}"
|
154
|
+
end
|
155
|
+
```
|
156
|
+
|
157
|
+
### Parameters
|
158
|
+
|
159
|
+
|
160
|
+
Name | Type | Description | Notes
|
161
|
+
------------- | ------------- | ------------- | -------------
|
162
|
+
**capture_request** | [**CaptureRequest**](CaptureRequest.md)| |
|
163
|
+
|
164
|
+
### Return type
|
165
|
+
|
166
|
+
[**Acknowledgement**](Acknowledgement.md)
|
167
|
+
|
168
|
+
### Authorization
|
169
|
+
|
170
|
+
[cp-api-key](../README.md#cp-api-key)
|
171
|
+
|
172
|
+
### HTTP request headers
|
173
|
+
|
174
|
+
- **Content-Type**: application/json, text/xml
|
175
|
+
- **Accept**: application/json, text/xml
|
176
|
+
|
177
|
+
|
178
|
+
## pa_res_request
|
179
|
+
|
180
|
+
> AuthResponse pa_res_request(pa_res_auth_request)
|
181
|
+
|
182
|
+
PaRes
|
183
|
+
|
184
|
+
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.
|
185
|
+
|
186
|
+
### Example
|
187
|
+
|
188
|
+
```ruby
|
189
|
+
# load the gem
|
190
|
+
require 'citypay_api_client'
|
191
|
+
# setup authorization
|
192
|
+
CityPayApiClient.configure do |config|
|
193
|
+
# Configure API key authorization: cp-api-key
|
194
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
195
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
196
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
197
|
+
end
|
198
|
+
|
199
|
+
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
200
|
+
pa_res_auth_request = CityPayApiClient::PaResAuthRequest.new # PaResAuthRequest |
|
201
|
+
|
202
|
+
begin
|
203
|
+
#PaRes
|
204
|
+
result = api_instance.pa_res_request(pa_res_auth_request)
|
205
|
+
p result
|
206
|
+
rescue CityPayApiClient::ApiError => e
|
207
|
+
puts "Exception when calling PaymentProcessingApi->pa_res_request: #{e}"
|
208
|
+
end
|
209
|
+
```
|
210
|
+
|
211
|
+
### Parameters
|
212
|
+
|
213
|
+
|
214
|
+
Name | Type | Description | Notes
|
215
|
+
------------- | ------------- | ------------- | -------------
|
216
|
+
**pa_res_auth_request** | [**PaResAuthRequest**](PaResAuthRequest.md)| |
|
217
|
+
|
218
|
+
### Return type
|
219
|
+
|
220
|
+
[**AuthResponse**](AuthResponse.md)
|
221
|
+
|
222
|
+
### Authorization
|
223
|
+
|
224
|
+
[cp-api-key](../README.md#cp-api-key)
|
225
|
+
|
226
|
+
### HTTP request headers
|
227
|
+
|
228
|
+
- **Content-Type**: application/json, text/xml
|
229
|
+
- **Accept**: application/json, text/xml
|
230
|
+
|
231
|
+
|
232
|
+
## retrieval_request
|
233
|
+
|
234
|
+
> AuthReferences retrieval_request(retrieve_request)
|
235
|
+
|
236
|
+
Retrieval
|
237
|
+
|
238
|
+
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.
|
239
|
+
|
240
|
+
### Example
|
241
|
+
|
242
|
+
```ruby
|
243
|
+
# load the gem
|
244
|
+
require 'citypay_api_client'
|
245
|
+
# setup authorization
|
246
|
+
CityPayApiClient.configure do |config|
|
247
|
+
# Configure API key authorization: cp-api-key
|
248
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
249
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
250
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
251
|
+
end
|
252
|
+
|
253
|
+
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
254
|
+
retrieve_request = CityPayApiClient::RetrieveRequest.new # RetrieveRequest |
|
255
|
+
|
256
|
+
begin
|
257
|
+
#Retrieval
|
258
|
+
result = api_instance.retrieval_request(retrieve_request)
|
259
|
+
p result
|
260
|
+
rescue CityPayApiClient::ApiError => e
|
261
|
+
puts "Exception when calling PaymentProcessingApi->retrieval_request: #{e}"
|
262
|
+
end
|
263
|
+
```
|
264
|
+
|
265
|
+
### Parameters
|
266
|
+
|
267
|
+
|
268
|
+
Name | Type | Description | Notes
|
269
|
+
------------- | ------------- | ------------- | -------------
|
270
|
+
**retrieve_request** | [**RetrieveRequest**](RetrieveRequest.md)| |
|
271
|
+
|
272
|
+
### Return type
|
273
|
+
|
274
|
+
[**AuthReferences**](AuthReferences.md)
|
275
|
+
|
276
|
+
### Authorization
|
277
|
+
|
278
|
+
[cp-api-key](../README.md#cp-api-key)
|
279
|
+
|
280
|
+
### HTTP request headers
|
281
|
+
|
282
|
+
- **Content-Type**: application/json, text/xml
|
283
|
+
- **Accept**: application/json, text/xml
|
284
|
+
|
285
|
+
|
286
|
+
## void_request
|
287
|
+
|
288
|
+
> Acknowledgement void_request(void_request)
|
289
|
+
|
290
|
+
Void
|
291
|
+
|
292
|
+
_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.
|
293
|
+
|
294
|
+
### Example
|
295
|
+
|
296
|
+
```ruby
|
297
|
+
# load the gem
|
298
|
+
require 'citypay_api_client'
|
299
|
+
# setup authorization
|
300
|
+
CityPayApiClient.configure do |config|
|
301
|
+
# Configure API key authorization: cp-api-key
|
302
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
303
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
304
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
305
|
+
end
|
306
|
+
|
307
|
+
api_instance = CityPayApiClient::PaymentProcessingApi.new
|
308
|
+
void_request = CityPayApiClient::VoidRequest.new # VoidRequest |
|
309
|
+
|
310
|
+
begin
|
311
|
+
#Void
|
312
|
+
result = api_instance.void_request(void_request)
|
313
|
+
p result
|
314
|
+
rescue CityPayApiClient::ApiError => e
|
315
|
+
puts "Exception when calling PaymentProcessingApi->void_request: #{e}"
|
316
|
+
end
|
317
|
+
```
|
318
|
+
|
319
|
+
### Parameters
|
320
|
+
|
321
|
+
|
322
|
+
Name | Type | Description | Notes
|
323
|
+
------------- | ------------- | ------------- | -------------
|
324
|
+
**void_request** | [**VoidRequest**](VoidRequest.md)| |
|
325
|
+
|
326
|
+
### Return type
|
327
|
+
|
328
|
+
[**Acknowledgement**](Acknowledgement.md)
|
329
|
+
|
330
|
+
### Authorization
|
331
|
+
|
332
|
+
[cp-api-key](../README.md#cp-api-key)
|
333
|
+
|
334
|
+
### HTTP request headers
|
335
|
+
|
336
|
+
- **Content-Type**: application/json, text/xml
|
337
|
+
- **Accept**: application/json, text/xml
|
338
|
+
|