예제 #1
0
        public ActionResult <Status> OperatorVerify(long mobile, string pass, long payMobile, int serviceID)
        {
            if (serviceID == 418)
            {
                PaymentOperations pOperations = new PaymentOperations(Configuration, _hostingEnvironment);
                return(pOperations.AzercellVeify(mobile, pass, payMobile));
            }

            return(new Status());
        }
예제 #2
0
        public MakePaymentResult MakePayment(MakePaymentRequest request)
        {
            var dataStoreType = ConfigurationManager.AppSettings["DataStoreType"];
            var account       = DataStore.GetAccount(dataStoreType, request);

            var result = new MakePaymentResult();

            result.Success = PaymentOperations.ExecutePayment(request.PaymentScheme, account, request);
            if (result.Success)
            {
                AccountOperations.DeductBalanceAndUpdateAccount(dataStoreType, account, request);
            }

            return(result);
        }
예제 #3
0
파일: Client.cs 프로젝트: c-d/SquareV1.Core
        /// <summary>
        /// Initializes client properties.
        /// </summary>
        private void Initialize()
        {
            PaymentOperations  = new PaymentOperations(this);
            LocationOperations = new LocationOperations(this);
            BusinessOperations = new BusinessOperations(this);
            RoleOperations     = new RoleOperations(this);
            EmployeeOperations = new EmployeeOperations(this);
            WebhookOperations  = new WebhookOperations(this);

            SerializationSettings = new JsonSerializerSettings
            {
                Formatting            = Formatting.Indented,
                DateFormatHandling    = DateFormatHandling.IsoDateFormat,
                DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
                NullValueHandling     = NullValueHandling.Ignore,
                ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
                ContractResolver      = new ReadOnlyJsonContractResolver(),
                Converters            = new List <JsonConverter>
                {
                    new Iso8601TimeSpanConverter()
                }
            };

            DeserializationSettings = new JsonSerializerSettings
            {
                DateFormatHandling    = DateFormatHandling.IsoDateFormat,
                DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
                NullValueHandling     = NullValueHandling.Ignore,
                ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
                ContractResolver      = new ReadOnlyJsonContractResolver(),
                Converters            = new List <JsonConverter>
                {
                    new Iso8601TimeSpanConverter()
                }
            };
        }
예제 #4
0
        public ActionResult <Status> WithdrawFunds(long mobile, string pass, long account, long serviceID, long amount)
        {
            PaymentOperations pOperations = new PaymentOperations(Configuration, _hostingEnvironment);

            return(pOperations.WithdrawFunds(mobile, pass, account, serviceID, amount));
        }
예제 #5
0
 public void ShouldReturnFalseWhenAccountIsNull()
 {
     Assert.False(PaymentOperations.ExecutePayment(PaymentScheme.Bacs, null, new MakePaymentRequest()));
 }