예제 #1
0
 /// <summary />
 public QuittanceType(SupplierBillIDType supplierBillID, DateTime creationDate, AcknowledgmentStatusType billStatus, PaymentIdType paymentId)
 {
     SupplierBillID = supplierBillID;
     CreationDate   = creationDate;
     BillStatus     = billStatus;
     PaymentId      = paymentId;
 }
예제 #2
0
 /// <summary/>
 public RefundApplication(string appNum, DateTime appDate, PaymentIdType paymentIdType, int cashType, ulong amount, string purpose)
 {
     AppNum    = appNum;
     AppDate   = appDate;
     PaymentId = paymentIdType;
     CashType  = cashType;
     Amount    = amount;
     Purpose   = purpose;
 }
예제 #3
0
 /// <summary />
 public NoticePayment(
     ChangeStatusInfo changeStatusInfo,
     PaymentIdType paymentId,
     DateTime paymentDate,
     PaymentOrgType paymentOrg,
     Payee payee,
     string purpose,
     ulong amount,
     TransKindType transKind)
     : base(paymentId, paymentDate, paymentOrg, payee, purpose, amount, transKind) => ChangeStatusInfo = changeStatusInfo;
예제 #4
0
 /// <summary />
 public PaymentType(
     PaymentIdType paymentId,
     DateTime paymentDate,
     PaymentOrgType paymentOrg,
     Payee payee,
     string purpose,
     ulong amount,
     TransKindType transKind
     ) : base(paymentOrg, payee, purpose, amount, transKind)
 {
     PaymentId   = paymentId;
     PaymentDate = paymentDate;
 }
예제 #5
0
        public async Task <IActionResult> Details(string id)
        {
            TempData["actionInitiated"] = true;

            var payment = await paymentRepository.Find(id);

            var           provider   = Enum.Parse <Provider>(payment.Provider);
            var           identifier = payment.TransactionId ?? payment.Token;
            PaymentIdType idType     = payment.TransactionId == null ? PaymentIdType.Token : PaymentIdType.TransactionId;

            GetDetailsResponse response = await rcpgClient.GetDetails(provider, identifier, idType);

            if (response.Errors.Any())
            {
                TempData["hasErrors"]        = true;
                TempData["notificationText"] = $"Notikusi kļūda. Kļūdas avots: \"{response.Errors.First().Source}\", kļūdas kods: \"{response.Errors.First().ErrorCode}\"";
                return(redirectToLandingPage());
            }

            string json = JObject.Parse(response.Details).ToString(Formatting.Indented);

            return(View("Details", json));
        }
예제 #6
0
 /// <summary>
 public ComparisonResult(PaymentIdType paymentId, ulong comparisonWeight)
 {
     PaymentId        = paymentId;
     ComparisonWeight = comparisonWeight;
 }
예제 #7
0
 public NoticeQuittance(SupplierBillIDType supplierBillID, DateTime creationDate, AcknowledgmentStatusType billStatus, PaymentIdType paymentId)
     : base(supplierBillID, creationDate, billStatus, paymentId)
 {
 }
예제 #8
0
        public async Task <GetDetailsResponse> GetDetails(Provider provider, string id, PaymentIdType idType)
        {
            if (channel.State == ChannelState.Shutdown)
            {
                var response = new GetDetailsResponse();
                response.Errors.Add(setClientShutDownError());
                return(response);
            }

            GetDetailsRequest request = new GetDetailsRequest()
            {
                Provider   = provider,
                Identifier = id,
                IdType     = idType
            };

            try
            {
                return(await client.GetDetailsAsync(request));
            }
            catch (RpcException ex)
            {
                var response = new GetDetailsResponse();
                response.Errors.Add(setGatewayError(ex.Message));
                return(response);
            }
        }