mirror of
https://github.com/NecroticBamboo/QRBee.git
synced 2025-12-21 12:11:53 +00:00
Mock payment gateway algorithm changed.
This commit is contained in:
parent
41dcf6ff0a
commit
f51e0a6ab8
@ -14,13 +14,13 @@ internal class PaymentGateway : IPaymentGateway
|
|||||||
|
|
||||||
public Task<GatewayResponse> Payment(TransactionInfo info, ClientCardData clientCardData)
|
public Task<GatewayResponse> Payment(TransactionInfo info, ClientCardData clientCardData)
|
||||||
{
|
{
|
||||||
if (info.Request.ClientResponse.MerchantRequest.Amount < 10)
|
if (info.Request.ClientResponse.MerchantRequest.Amount > 100)
|
||||||
{
|
{
|
||||||
_logger.LogInformation($"Transaction with id: {info.Id} failed");
|
_logger.LogInformation($"Transaction with id: {info.Id} failed");
|
||||||
return Task.FromResult(new GatewayResponse
|
return Task.FromResult(new GatewayResponse
|
||||||
{
|
{
|
||||||
Success = false,
|
Success = false,
|
||||||
ErrorMessage = "Amount is too low",
|
ErrorMessage = "Amount is too high",
|
||||||
GatewayTransactionId = Guid.NewGuid().ToString()
|
GatewayTransactionId = Guid.NewGuid().ToString()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user