Example #1
0
        public static void pay(Customer cust, Customer freelancer, string price)
        {
            CustomerBalanceTransactionCreateOptions custTrans = new CustomerBalanceTransactionCreateOptions
            {
                Currency = "sgd",
                Amount   = long.Parse("-" + price)
            };
            CustomerBalanceTransactionService balanceService = new CustomerBalanceTransactionService();

            balanceService.Create(cust.Id, custTrans);

            CustomerBalanceTransactionCreateOptions freeTrans = new CustomerBalanceTransactionCreateOptions
            {
                Currency = "sgd",
                Amount   = long.Parse(price)
            };

            balanceService.Create(freelancer.Id, freeTrans);
        }
Example #2
0
        public CustomerBalanceTransactionServiceTest(
            StripeMockFixture stripeMockFixture,
            MockHttpClientFixture mockHttpClientFixture)
            : base(stripeMockFixture, mockHttpClientFixture)
        {
            this.service = new CustomerBalanceTransactionService(this.StripeClient);

            this.createOptions = new CustomerBalanceTransactionCreateOptions
            {
                Amount   = 1234,
                Currency = "usd",
            };

            this.listOptions = new CustomerBalanceTransactionListOptions
            {
                Limit = 1,
            };

            this.updateOptions = new CustomerBalanceTransactionUpdateOptions
            {
                Description = "description",
            };
        }