Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions TestHosts/TestHosts/SoapServices/PataPawaPostPayService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ public ProcessBillResponse ProcessBill(String username,
String customer_name,
Decimal amount) {
using ResolvedDbContext<PataPawaContext>? resolvedContext = this.ContextResolver.Resolve(PataPawaReadModelKey);
PostPaidAccount account = PataPawaPostPayService.GetAccount(username, api_key, resolvedContext.Context);
PostPaidAccount account = GetAccount(username, api_key, resolvedContext.Context);
if (account == null) {
// TODO: this might not be the correct way to respond in this case
return new ProcessBillResponse {
Status = -1,
Message = "Account not found"
Expand All @@ -81,7 +80,6 @@ public ProcessBillResponse ProcessBill(String username,

if (bill == null) {
// Bill not found
// TODO: this might not be the correct way to respond in this case
return new ProcessBillResponse {
Status = -1,
Message = $"Bill for account no [{account_no}] not found"
Expand All @@ -107,7 +105,6 @@ public VerifyResponse VerifyAccount(String username,
using ResolvedDbContext<PataPawaContext>? resolvedContext = this.ContextResolver.Resolve(PataPawaReadModelKey);
PostPaidAccount account = PataPawaPostPayService.GetAccount(username, api_key, resolvedContext.Context);
if (account == null) {
// TODO: this might not be the correct way to respond in this case
return new VerifyResponse {
AccountNumber = null,
AccountBalance = 0,
Expand All @@ -121,7 +118,6 @@ public VerifyResponse VerifyAccount(String username,

if (bill == null) {
// Bill not found
// TODO: this might not be the correct way to respond in this case
return new VerifyResponse {
AccountNumber = null,
AccountBalance = 0,
Expand All @@ -142,7 +138,7 @@ public VerifyResponse VerifyAccount(String username,
private static PostPaidAccount CreatePostPaidAccount(String username,
String password,
PataPawaContext context) {
PostPaidAccount account = new PostPaidAccount {
PostPaidAccount account = new() {
Password = password,
UserName = username,
Balance = 0,
Expand Down
Loading