mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 15:06:50 +00:00
commit
c38216b6b7
@ -2621,9 +2621,23 @@ Returns a string showed to the developer
|
||||
else
|
||||
first+ "***" + "***" + second
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint returns BIC on an bank according to next rules:
|
||||
* 1st try - Inspect bank routing
|
||||
* 2nd ry - get deprecated field "swiftBic"
|
||||
* @param bankId The BANK_ID specified at an endpoint's path
|
||||
* @return BIC of the Bank
|
||||
*/
|
||||
def getBicFromBankId(bankId: String)= {
|
||||
Connector.connector.vend.getBankLegacy(BankId(bankId), None).map(_._1.swiftBic).getOrElse("")
|
||||
Connector.connector.vend.getBankLegacy(BankId(bankId), None) match {
|
||||
case Full((bank, _)) =>
|
||||
bank.bankRoutingScheme match {
|
||||
case "BIC" => bank.bankRoutingAddress
|
||||
case _ => bank.swiftBic
|
||||
}
|
||||
case _ => ""
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -308,6 +308,7 @@ object ErrorMessages {
|
||||
val ConsentAllowedScaMethods = "OBP-35009: Only SMS and EMAIL are supported as SCA methods. "
|
||||
val SmsServerNotResponding = "OBP-35010: SMS server is not working or SMS server can not send the message to the phone number: "
|
||||
val AuthorizationNotFound = "OBP-35011: Resource identification of the related Consent authorisation sub-resource not found by AUTHORIZATION_ID. "
|
||||
val ConsentAlreadyRevoked = "OBP-35012: Consent is already revoked. "
|
||||
|
||||
//Authorisations
|
||||
val AuthorisationNotFound = "OBP-36001: Authorisation not found. Please specify valid values for PAYMENT_ID and AUTHORISATION_ID. "
|
||||
|
||||
@ -88,6 +88,8 @@ object MappedConsentProvider extends ConsentProvider {
|
||||
}
|
||||
override def revoke(consentId: String): Box[MappedConsent] = {
|
||||
MappedConsent.find(By(MappedConsent.mConsentId, consentId)) match {
|
||||
case Full(consent) if consent.status == ConsentStatus.REVOKED.toString =>
|
||||
Failure(ErrorMessages.ConsentAlreadyRevoked)
|
||||
case Full(consent) =>
|
||||
tryo(consent
|
||||
.mStatus(ConsentStatus.REVOKED.toString)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user