use of uk.org.openbanking.datamodel.payment.OBWriteInternationalConsentResponse6 in project openbanking-aspsp by OpenBankingToolkit.
the class InternationalPaymentConsentsApiController method createInternationalPaymentConsents.
public ResponseEntity<OBWriteInternationalConsentResponse6> createInternationalPaymentConsents(OBWriteInternationalConsent5 obWriteInternationalConsent5, String authorization, String xIdempotencyKey, String xJwsSignature, DateTime xFapiAuthDate, String xFapiCustomerIpAddress, String xFapiInteractionId, String xCustomerUserAgent, HttpServletRequest request, Principal principal) throws OBErrorResponseException {
return rsEndpointWrapperService.paymentEndpoint().authorization(authorization).xFapiFinancialId(rsEndpointWrapperService.rsConfiguration.financialId).principal(principal).obVersion(getOBVersion(request.getRequestURI())).filters(f -> {
f.verifyIdempotencyKeyLength(xIdempotencyKey);
f.verifyJwsDetachedSignature(xJwsSignature, request);
f.validateRisk(obWriteInternationalConsent5.getRisk());
}).execute((String tppId) -> {
exchangeRateVerifier.verify(obWriteInternationalConsent5.getData().getInitiation().getExchangeRateInformation());
HttpHeaders additionalHttpHeaders = new HttpHeaders();
additionalHttpHeaders.add("x-ob-client-id", tppId);
return rsStoreGateway.toRsStore(request, additionalHttpHeaders, Collections.emptyMap(), OBWriteInternationalConsentResponse6.class, obWriteInternationalConsent5);
});
}
Aggregations