Skip to content

Commit 24cf296

Browse files
committed
fix: Add success status check for transaction creation and update CreateTransactionRequest to make Provider optional
1 parent aebd40e commit 24cf296

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

Creobe.BmlConnect.sln

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,28 @@ EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1212
Debug|Any CPU = Debug|Any CPU
13+
Debug|x64 = Debug|x64
14+
Debug|x86 = Debug|x86
1315
Release|Any CPU = Release|Any CPU
14-
EndGlobalSection
15-
GlobalSection(SolutionProperties) = preSolution
16-
HideSolutionNode = FALSE
16+
Release|x64 = Release|x64
17+
Release|x86 = Release|x86
1718
EndGlobalSection
1819
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1920
{F2D8195C-B679-420D-80FA-F7201915551A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2021
{F2D8195C-B679-420D-80FA-F7201915551A}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{F2D8195C-B679-420D-80FA-F7201915551A}.Debug|x64.ActiveCfg = Debug|Any CPU
23+
{F2D8195C-B679-420D-80FA-F7201915551A}.Debug|x64.Build.0 = Debug|Any CPU
24+
{F2D8195C-B679-420D-80FA-F7201915551A}.Debug|x86.ActiveCfg = Debug|Any CPU
25+
{F2D8195C-B679-420D-80FA-F7201915551A}.Debug|x86.Build.0 = Debug|Any CPU
2126
{F2D8195C-B679-420D-80FA-F7201915551A}.Release|Any CPU.ActiveCfg = Release|Any CPU
2227
{F2D8195C-B679-420D-80FA-F7201915551A}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{F2D8195C-B679-420D-80FA-F7201915551A}.Release|x64.ActiveCfg = Release|Any CPU
29+
{F2D8195C-B679-420D-80FA-F7201915551A}.Release|x64.Build.0 = Release|Any CPU
30+
{F2D8195C-B679-420D-80FA-F7201915551A}.Release|x86.ActiveCfg = Release|Any CPU
31+
{F2D8195C-B679-420D-80FA-F7201915551A}.Release|x86.Build.0 = Release|Any CPU
32+
EndGlobalSection
33+
GlobalSection(SolutionProperties) = preSolution
34+
HideSolutionNode = FALSE
2335
EndGlobalSection
2436
GlobalSection(NestedProjects) = preSolution
2537
{F2D8195C-B679-420D-80FA-F7201915551A} = {C01015ED-0F08-421D-9052-8FF0AD7D811E}

src/Creobe.BmlConnect/BmlConnectClient.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public BmlConnectClient(HttpClient client, IOptions<BmlConnectOptions> options)
4747
};
4848

4949
var response = await _httpClient.PostAsJsonAsync("transactions", transaction);
50+
response.EnsureSuccessStatusCode();
5051
return await response.Content.ReadFromJsonAsync<Transaction>(_serailizerOptions);
5152
}
5253
catch (Exception ex)

src/Creobe.BmlConnect/CreateTransactionRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ public sealed record CreateTransactionRequest(
55
string Currency,
66
string CustomerReference,
77
string LocalId,
8-
string Provider,
8+
string? Provider = null,
99
string? RedirectUrl = null);

0 commit comments

Comments
 (0)