Class: CyberSourceMergedSpec::PayerAuthenticationController
- Inherits:
-
BaseController
- Object
- BaseController
- CyberSourceMergedSpec::PayerAuthenticationController
- Defined in:
- lib/cyber_source_merged_spec/controllers/payer_authentication_controller.rb
Overview
PayerAuthenticationController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#check_payer_auth_enrollment(check_payer_auth_enrollment_request) ⇒ ApiResponse
This call verifies that the card is enrolled in a card authentication program.
-
#payer_auth_setup(payer_auth_setup_request) ⇒ ApiResponse
A new service for Merchants to get reference_id for Digital Wallets to use in place of BIN number in Cardinal.
-
#validate_authentication_results(validate_request) ⇒ ApiResponse
This call retrieves and validates the authentication results from issuer and allows the merchant to proceed with processing the payment.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from CyberSourceMergedSpec::BaseController
Instance Method Details
#check_payer_auth_enrollment(check_payer_auth_enrollment_request) ⇒ ApiResponse
This call verifies that the card is enrolled in a card authentication program. check_payer_auth_enrollment_request Required parameter: TODO: type description here
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/cyber_source_merged_spec/controllers/payer_authentication_controller.rb', line 48 def check_payer_auth_enrollment(check_payer_auth_enrollment_request) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/risk/v1/authentications', Server::DEFAULT) .body_param(new_parameter(check_payer_auth_enrollment_request) .is_required(true)) .header_param(new_parameter('application/json; charset=utf-8', key: 'content-type')) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RiskV1AuthenticationsPost201Response.method(:from_hash)) .is_api_response(true) .local_error('400', 'Invalid request', RiskV1AuthenticationsPost400Response2Exception) .local_error('502', 'Unexpected system error or system timeout.', RiskV1AuthenticationsPost502ResponseException)) .execute end |
#payer_auth_setup(payer_auth_setup_request) ⇒ ApiResponse
A new service for Merchants to get reference_id for Digital Wallets to use in place of BIN number in Cardinal. Set up file while authenticating with Cardinal. This service should be called by Merchant when payment instrument chosen or changes. This service has to be called before enrollment check. The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. parameter: TODO: type description here
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/cyber_source_merged_spec/controllers/payer_authentication_controller.rb', line 19 def payer_auth_setup(payer_auth_setup_request) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/risk/v1/authentication-setups', Server::DEFAULT) .body_param(new_parameter(payer_auth_setup_request) .is_required(true)) .header_param(new_parameter('application/json; charset=utf-8', key: 'content-type')) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RiskV1AuthenticationSetupsPost201Response.method(:from_hash)) .is_api_response(true) .local_error('400', 'Invalid request', RiskV1AuthenticationsPost400ResponseException) .local_error('502', 'Unexpected system error or system timeout.', RiskV1AuthenticationsPost502ResponseException)) .execute end |
#validate_authentication_results(validate_request) ⇒ ApiResponse
This call retrieves and validates the authentication results from issuer and allows the merchant to proceed with processing the payment. description here
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/cyber_source_merged_spec/controllers/payer_authentication_controller.rb', line 76 def validate_authentication_results(validate_request) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/risk/v1/authentication-results', Server::DEFAULT) .body_param(new_parameter(validate_request) .is_required(true)) .header_param(new_parameter('application/json; charset=utf-8', key: 'content-type')) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RiskV1AuthenticationResultsPost201Response.method(:from_hash)) .is_api_response(true) .local_error('400', 'Invalid request.', RiskV1AuthenticationResultsPost400ResponseException) .local_error('502', 'Unexpected system error or system timeout.', RiskV1AuthenticationResultsPost502ResponseException)) .execute end |