Skip to content

Commit 51d4d05

Browse files
committed
Update Lloyds
1 parent f29f250 commit 51d4d05

File tree

2 files changed

+15
-46
lines changed

2 files changed

+15
-46
lines changed

src/OpenBanking.Library.Connector/BankProfiles/Generators/LloydsGenerator.cs

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,12 @@ or LloydsBank.BankOfScotlandBusiness
7272
LloydsBank.MbnaPersonal => GetFinancialId(LloydsBank.MbnaPersonal),
7373
_ => throw new ArgumentOutOfRangeException(nameof(bank), bank, null)
7474
},
75-
bank is not LloydsBank.Sandbox
76-
? new AccountAndTransactionApi
77-
{
78-
BaseUrl =
79-
GetAccountAndTransactionV3BaseUrl(bank)
80-
}
81-
: null,
82-
bank is not LloydsBank.Sandbox
83-
? new AccountAndTransactionApi
84-
{
85-
ApiVersion = AccountAndTransactionApiVersion.Version4p0,
86-
BaseUrl =
87-
GetApiBaseUrl(bank, "v4.0/aisp")
88-
}
89-
: null,
75+
new AccountAndTransactionApi { BaseUrl = GetApiBaseUrl(bank, "v3.1/aisp") },
76+
new AccountAndTransactionApi
77+
{
78+
ApiVersion = AccountAndTransactionApiVersion.Version4p0,
79+
BaseUrl = GetApiBaseUrl(bank, "v4.0/aisp")
80+
},
9081
new PaymentInitiationApi { BaseUrl = GetPaymentsApiBaseUrl(bank, false) },
9182
new PaymentInitiationApi
9283
{
@@ -241,11 +232,6 @@ bank is not LloydsBank.Sandbox
241232
},
242233
AccountAndTransactionApiSettings = new AccountAndTransactionApiSettings
243234
{
244-
GetFinancialId = useV4NotV3 => useV4NotV3 switch
245-
{
246-
true => GetFinancialId(LloydsBank.LloydsPersonal),
247-
false => null
248-
},
249235
AccountAccessConsentTemplateExternalApiRequestAdjustments = externalApiRequest =>
250236
{
251237
var elementsToRemove = new List<AccountAndTransactionModelsPublic.Permissions>
@@ -261,10 +247,6 @@ bank is not LloydsBank.Sandbox
261247
return externalApiRequest;
262248
}
263249
},
264-
PaymentInitiationApiSettings =
265-
new PaymentInitiationApiSettings { FinancialId = GetFinancialId(LloydsBank.LloydsPersonal) },
266-
VariableRecurringPaymentsApiSettings =
267-
new VariableRecurringPaymentsApiSettings { FinancialId = GetFinancialId(LloydsBank.LloydsPersonal) },
268250
AspspBrandId = bank switch
269251
{
270252
LloydsBank.Sandbox => 10004, // sandbox
@@ -333,31 +315,18 @@ private string GetPaymentsApiBaseUrl(LloydsBank bank, bool useV4NotV3) =>
333315
{
334316
LloydsBank.Sandbox => GetPaymentInitiationApiBaseUrl(LloydsBank.Sandbox),
335317
LloydsBank.LloydsPersonal or LloydsBank.LloydsBusiness or LloydsBank.LloydsCommerical =>
336-
$"https://secure-api.lloydsbank.com/prod01/lbg/lyds/open-banking/{suffix}", // from https://developer.lloydsbanking.com/node/4055#post-domestic-payment-consents-3.1.10
318+
$"https://secure-api.lloydsbank.com/prod01/lbg/lyds/open-banking/{suffix}", // from https://developer.lloydsbanking.com/node/4045,
319+
// https://developer.lloydsbanking.com/node/4055#post-domestic-payment-consents-3.1.10
337320
LloydsBank.HalifaxPersonal =>
338-
$"https://secure-api.halifax.co.uk/prod01/lbg/lyds/open-banking/{suffix}", // from https://developer.lloydsbanking.com/node/4055#post-domestic-payment-consents-3.1.10
321+
$"https://secure-api.halifax.co.uk/prod01/lbg/hfx/open-banking/{suffix}", // from https://developer.lloydsbanking.com/node/4045,
322+
// https://developer.lloydsbanking.com/node/4055#post-domestic-payment-consents-3.1.10
339323
LloydsBank.BankOfScotlandPersonal or LloydsBank.BankOfScotlandBusiness
340324
or LloydsBank.BankOfScotlandCommerical =>
341-
$"https://secure-api.bankofscotland.co.uk/prod01/lbg/lyds/open-banking/{suffix}", // from https://developer.lloydsbanking.com/node/4055#post-domestic-payment-consents-3.1.10
325+
$"https://secure-api.bankofscotland.co.uk/prod01/lbg/bos/open-banking/{suffix}", // from https://developer.lloydsbanking.com/node/4045,
326+
// https://developer.lloydsbanking.com/node/4055#post-domestic-payment-consents-3.1.10
342327
LloydsBank.MbnaPersonal =>
343-
$"https://secure-api.mbna.co.uk/prod01/lbg/lyds/open-banking/{suffix}", // from https://developer.lloydsbanking.com/node/4055#post-domestic-payment-consents-3.1.10
328+
$"https://secure-api.mbna.co.uk/prod01/lbg/mbn/open-banking/{suffix}", // from https://developer.lloydsbanking.com/node/4045,
329+
// https://developer.lloydsbanking.com/node/4055#post-domestic-payment-consents-3.1.10
344330
_ => throw new ArgumentOutOfRangeException(nameof(bank), bank, null)
345331
};
346-
347-
private static string GetAccountAndTransactionV3BaseUrl(LloydsBank bank) =>
348-
bank switch
349-
{
350-
LloydsBank.Sandbox =>
351-
"https://matls.rs.aspsp.sandbox.lloydsbanking.com/open-banking/v3.1.10/aisp", // from API discovery endpoint
352-
LloydsBank.LloydsPersonal or LloydsBank.LloydsBusiness or LloydsBank.LloydsCommerical =>
353-
"https://secure-api.lloydsbank.com/prod01/lbg/lyds/open-banking/v3.1/aisp", // from https://developer.lloydsbanking.com/node/4045
354-
LloydsBank.HalifaxPersonal =>
355-
"https://secure-api.halifax.co.uk/prod01/lbg/hfx/open-banking/v3.1/aisp", // from https://developer.lloydsbanking.com/node/4045
356-
LloydsBank.BankOfScotlandPersonal or LloydsBank.BankOfScotlandBusiness
357-
or LloydsBank.BankOfScotlandCommerical =>
358-
"https://secure-api.bankofscotland.co.uk/prod01/lbg/bos/open-banking/v3.1/aisp", // from https://developer.lloydsbanking.com/node/4045
359-
LloydsBank.MbnaPersonal =>
360-
"https://secure-api.mbna.co.uk/prod01/lbg/mbn/open-banking/v3.1/aisp", // from https://developer.lloydsbanking.com/node/4045
361-
_ => throw new ArgumentOutOfRangeException(nameof(bank), bank, null)
362-
};
363332
}

src/OpenBanking.WebApp.Connector/OpenBanking.WebApp.Connector.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<UserSecretsId>aa921213-9461-4f9e-8fec-153624ec67ad</UserSecretsId>
88
<AssemblyName>FinnovationLabs.OpenBanking.WebApp.Connector</AssemblyName>
99
<RootNamespace>FinnovationLabs.OpenBanking.WebApp.Connector</RootNamespace>
10-
<Version>16.1.0</Version>
10+
<Version>16.1.1</Version>
1111
<Copyright>Finnovation Labs Limited and Contributors</Copyright>
1212
<Company>Finnovation Labs Limited</Company>
1313
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)