class CityPayApiClient::PaymentProcessingApi
Attributes
Public Class Methods
# File lib/citypay_api_client/api/payment_processing_api.rb, line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
CRes 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. @param c_res_auth_request [CResAuthRequest] @param [Hash] opts the optional parameters @return [AuthResponse]
# File lib/citypay_api_client/api/payment_processing_api.rb, line 90 def c_res_request(c_res_auth_request, opts = {}) data, _status_code, _headers = c_res_request_with_http_info(c_res_auth_request, opts) data end
CRes 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. @param c_res_auth_request [CResAuthRequest] @param [Hash] opts the optional parameters @return [Array<(AuthResponse
, Integer, Hash)>] AuthResponse
data, response status code and response headers
# File lib/citypay_api_client/api/payment_processing_api.rb, line 100 def c_res_request_with_http_info(c_res_auth_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentProcessingApi.c_res_request ...' end # verify the required parameter 'c_res_auth_request' is set if @api_client.config.client_side_validation && c_res_auth_request.nil? fail ArgumentError, "Missing the required parameter 'c_res_auth_request' when calling PaymentProcessingApi.c_res_request" end # resource path local_var_path = '/cres' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(c_res_auth_request) # return_type return_type = opts[:return_type] || 'AuthResponse' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentProcessingApi#c_res_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Capture _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. @param capture_request
[CaptureRequest] @param [Hash] opts the optional parameters @return [Acknowledgement]
# File lib/citypay_api_client/api/payment_processing_api.rb, line 154 def capture_request(capture_request, opts = {}) data, _status_code, _headers = capture_request_with_http_info(capture_request, opts) data end
Capture _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. @param capture_request
[CaptureRequest] @param [Hash] opts the optional parameters @return [Array<(Acknowledgement
, Integer, Hash)>] Acknowledgement
data, response status code and response headers
# File lib/citypay_api_client/api/payment_processing_api.rb, line 164 def capture_request_with_http_info(capture_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentProcessingApi.capture_request ...' end # verify the required parameter 'capture_request' is set if @api_client.config.client_side_validation && capture_request.nil? fail ArgumentError, "Missing the required parameter 'capture_request' when calling PaymentProcessingApi.capture_request" end # resource path local_var_path = '/capture' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(capture_request) # return_type return_type = opts[:return_type] || 'Acknowledgement' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentProcessingApi#capture_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
PaRes 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. @param pa_res_auth_request [PaResAuthRequest] @param [Hash] opts the optional parameters @return [AuthResponse]
# File lib/citypay_api_client/api/payment_processing_api.rb, line 218 def pa_res_request(pa_res_auth_request, opts = {}) data, _status_code, _headers = pa_res_request_with_http_info(pa_res_auth_request, opts) data end
PaRes 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. @param pa_res_auth_request [PaResAuthRequest] @param [Hash] opts the optional parameters @return [Array<(AuthResponse
, Integer, Hash)>] AuthResponse
data, response status code and response headers
# File lib/citypay_api_client/api/payment_processing_api.rb, line 228 def pa_res_request_with_http_info(pa_res_auth_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentProcessingApi.pa_res_request ...' end # verify the required parameter 'pa_res_auth_request' is set if @api_client.config.client_side_validation && pa_res_auth_request.nil? fail ArgumentError, "Missing the required parameter 'pa_res_auth_request' when calling PaymentProcessingApi.pa_res_request" end # resource path local_var_path = '/pares' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(pa_res_auth_request) # return_type return_type = opts[:return_type] || 'AuthResponse' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentProcessingApi#pa_res_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieval 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. @param retrieve_request [RetrieveRequest] @param [Hash] opts the optional parameters @return [AuthReferences]
# File lib/citypay_api_client/api/payment_processing_api.rb, line 282 def retrieval_request(retrieve_request, opts = {}) data, _status_code, _headers = retrieval_request_with_http_info(retrieve_request, opts) data end
Retrieval 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. @param retrieve_request [RetrieveRequest] @param [Hash] opts the optional parameters @return [Array<(AuthReferences
, Integer, Hash)>] AuthReferences
data, response status code and response headers
# File lib/citypay_api_client/api/payment_processing_api.rb, line 292 def retrieval_request_with_http_info(retrieve_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentProcessingApi.retrieval_request ...' end # verify the required parameter 'retrieve_request' is set if @api_client.config.client_side_validation && retrieve_request.nil? fail ArgumentError, "Missing the required parameter 'retrieve_request' when calling PaymentProcessingApi.retrieval_request" end # resource path local_var_path = '/retrieve' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(retrieve_request) # return_type return_type = opts[:return_type] || 'AuthReferences' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentProcessingApi#retrieval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Void _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. @param void_request
[VoidRequest] @param [Hash] opts the optional parameters @return [Acknowledgement]
# File lib/citypay_api_client/api/payment_processing_api.rb, line 346 def void_request(void_request, opts = {}) data, _status_code, _headers = void_request_with_http_info(void_request, opts) data end
Void _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. @param void_request
[VoidRequest] @param [Hash] opts the optional parameters @return [Array<(Acknowledgement
, Integer, Hash)>] Acknowledgement
data, response status code and response headers
# File lib/citypay_api_client/api/payment_processing_api.rb, line 356 def void_request_with_http_info(void_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PaymentProcessingApi.void_request ...' end # verify the required parameter 'void_request' is set if @api_client.config.client_side_validation && void_request.nil? fail ArgumentError, "Missing the required parameter 'void_request' when calling PaymentProcessingApi.void_request" end # resource path local_var_path = '/void' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(void_request) # return_type return_type = opts[:return_type] || 'Acknowledgement' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PaymentProcessingApi#void_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end