Ejemplo n.º 1
0
        public void PayPointPayPal()
        {
            var             papi    = new PayPointApi();
            PayPointAccount account = new PayPointAccount();

            papi.PayPointPayPal(account, "www.google.com", "www.google.com", "www.google.com", 5.0M, "GBP", true);
        }
Ejemplo n.º 2
0
        }        //HandleCollectionLogic

        /// <summary>
        /// For each loan schedule marks it as late, it's loan as late, insert fee if needed/possible
        /// </summary>
        /// <param name="sr"></param>
        private void MarkLoanAsLate(SafeReader sr)
        {
            int      id             = sr["id"];
            int      loanId         = sr["LoanId"];
            int      customerId     = sr["CustomerId"];
            DateTime scheduleDate   = sr["ScheduleDate"];
            string   loanStatus     = sr["LoanStatus"];
            string   scheduleStatus = sr["ScheduleStatus"];
            decimal  interest       = sr["Interest"];

            if (loanStatus != "Late")
            {
                DB.ExecuteNonQuery("UpdateLoanStatusToLate", CommandSpecies.StoredProcedure,
                                   new QueryParameter("LoanId", loanId),
                                   new QueryParameter("CustomerId", customerId),
                                   new QueryParameter("PaymentStatus", "Late"),
                                   new QueryParameter("LoanStatus", "Late"));
            }
            if (scheduleStatus != "Late")
            {
                DB.ExecuteNonQuery("UpdateLoanScheduleStatus", CommandSpecies.StoredProcedure, new QueryParameter("Id", id), new QueryParameter("Status", "Late"));
            }
            int daysBetween = (int)(this.now - scheduleDate).TotalDays;
            int feeAmount, feeType;

            CalculateFee(daysBetween, interest, out feeAmount, out feeType);
            bool appliedLateCharge = false;

            if (feeType != 0)
            {
                var papi = new PayPointApi();
                appliedLateCharge = papi.ApplyLateCharge(feeAmount, loanId, feeType);
            }
            Log.Info("Applied late charge for customer {0} loan {1} : {2}", customerId, loanId, appliedLateCharge);
        }         // MarkLoansAsLate
Ejemplo n.º 3
0
        public PaypointController(
            IEzbobWorkplaceContext context,
            IPacnetPaypointServiceLogRepository pacnetPaypointServiceLogRepository,
            IPaypointTransactionRepository paypointTransactionRepository,
            PayPointApi paypoint,
            ILoanOptionsRepository loanOptionsRepository
            )
        {
            this.context       = context;
            this.logRepository = pacnetPaypointServiceLogRepository;
            this.paypointTransactionRepository = paypointTransactionRepository;
            this.paypointApi           = paypoint;
            this.loanOptionsRepository = loanOptionsRepository;

            this.serviceClient = new ServiceClient();
        }         // constructor
Ejemplo n.º 4
0
 public LoanHistoryController(
     CustomerRepository customersRepository,
     PaymentRolloverRepository rolloverRepository,
     LoanScheduleRepository loanScheduleRepository,
     IEzbobWorkplaceContext context,
     LoanRepository loanRepository,
     PayPointApi paypoint,
     ServiceClient serviceClient)
 {
     this.customerRepository     = customersRepository;
     this.rolloverRepository     = rolloverRepository;
     this.loanScheduleRepository = loanScheduleRepository;
     this.context        = context;
     this.loanRepository = loanRepository;
     this.paypoint       = paypoint;
     this.serviceClient  = serviceClient;
 }
Ejemplo n.º 5
0
        public void Test1()
        {
            PayPointApi     papi    = new PayPointApi();
            PayPointAccount account = new PayPointAccount();

            papi.RefundCard(account, "Mr Cardholder", "4444333322221111", 50.99M, new DateTime(2015, 1, 1), "1", new DateTime(2009, 1, 1), "product=ezbob", "123", true);

            string repo = papi.GetReport(account, "CSV", "Date", DateTime.Now.ToString("yyyyMMdd"), "GBP");

            /*SECVPNService service = new SECVPNService();
             * service.
             *
             * string r = service.validateCardFull("secpay", "secpay", "TRAN00001_SC", "127.0.0.1", "Mr Cardholder",
             *                                               "4444333322221111", "50.99", "0115", "1", "0109",
             *                                               "prod=funny_book,item_amount=25.00x1;prod=sad_book,item_amount=12.50x2", "", "",
             *                                               "test_status=true,dups=false,card_type=Visa,cv2=123");
             * string res = service.refundCardFull("secpay", "secpay", "TRAN00001_SC", "50.99", "secpay", "TRAN00001_SC_refund");
             * var report = service.getReport("secpay", "secpay", "secpay", "CSV", "Date", "201204", "GBP", "", false, false);*/
        }