Update channelOrigin as String
This commit is contained in:
parent
08ecdd84c0
commit
d9c9a31496
Binary file not shown.
@ -156,4 +156,17 @@ public class SerializationHelper {
|
|||||||
|
|
||||||
return encodeSha256(finalString);
|
return encodeSha256(finalString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String generateSignature(
|
||||||
|
Long id,
|
||||||
|
String channelOrigin
|
||||||
|
) {
|
||||||
|
String channelBase64 = encodeStringToBase64(channelOrigin);
|
||||||
|
String finalString = id + channelBase64;
|
||||||
|
|
||||||
|
log.info("1. Operation concatenando valores: {}", finalString);
|
||||||
|
log.info("2. Channel Origin codificado: {}", channelBase64);
|
||||||
|
|
||||||
|
return encodeSha256(finalString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -266,7 +266,7 @@ public class HttpClientService implements HttpClientUseCase {
|
|||||||
log.info("Metodo HTTP: {}", request.getMethod().name());
|
log.info("Metodo HTTP: {}", request.getMethod().name());
|
||||||
|
|
||||||
if(request.getBody() != null) {
|
if(request.getBody() != null) {
|
||||||
log.info("Cuerpo de la Peticion: {}", request.getBody());
|
log.info("Peticion Cuerpo: {}", request.getBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
return switch (request.getMethod()) {
|
return switch (request.getMethod()) {
|
||||||
|
|||||||
@ -12,5 +12,5 @@ import lombok.*;
|
|||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Instruction {
|
public class Instruction {
|
||||||
private InstructionPurposeType instructionPurposeType; // Request JSON: "channelOrigin" (BOL)
|
private String instructionPurposeType; // Request JSON: "channelOrigin" (BOL)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
package com.banesco.module.instruction.domain.model;
|
|
||||||
|
|
||||||
public enum InstructionPurposeType {
|
|
||||||
BOL,
|
|
||||||
}
|
|
||||||
@ -43,6 +43,9 @@ public class PaymentInitiationRequestService implements PaymentInitiationRequest
|
|||||||
apiResponse.getData(),
|
apiResponse.getData(),
|
||||||
apiResponse.getStatusResponse().getStatusCode()
|
apiResponse.getStatusResponse().getStatusCode()
|
||||||
);
|
);
|
||||||
|
} catch (ApiPrivateException e) {
|
||||||
|
log.warn("Excepcion de la api privada: {} -> {}", e.getStatusCode(), e.getMessage());
|
||||||
|
response = messageHelper.handleException(HttpStatusCodeException.badRequest("400"));
|
||||||
} catch (HttpStatusCodeException e) {
|
} catch (HttpStatusCodeException e) {
|
||||||
log.error("Excepcion HTTP del api privada: {} - {}", e.getStatusCode(), e.getErrorCode());
|
log.error("Excepcion HTTP del api privada: {} - {}", e.getStatusCode(), e.getErrorCode());
|
||||||
response = messageHelper.handleException(e);
|
response = messageHelper.handleException(e);
|
||||||
|
|||||||
@ -77,8 +77,7 @@ public class PaymentInitiationRequestRequest {
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getChannelCode() {
|
public String getChannelCode() {
|
||||||
return procedureRequest
|
return procedureRequest
|
||||||
.getInstructionPurposeType()
|
.getInstructionPurposeType();
|
||||||
.name();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user