コード例 #1
0
 public virtual async Task<StripeInvoiceLineItem> CreateAsync(StripeInvoiceItemCreateOptions createOptions, StripeRequestOptions requestOptions = null)
 {
     return Mapper<StripeInvoiceLineItem>.MapFromJson(
         await Requestor.PostStringAsync(this.ApplyAllParameters(createOptions, Urls.InvoiceItems, false),
         SetupRequestOptions(requestOptions))
     );
 }
コード例 #2
0
		public virtual StripeInvoiceItem Create(StripeInvoiceItemCreateOptions createOptions)
		{
			var url = ParameterBuilder.ApplyAllParameters(createOptions, Urls.InvoiceItems);

			var response = Requestor.PostString(url,ApiKeyAppSettingName);

			return Mapper<StripeInvoiceItem>.MapFromJson(response);
		}
コード例 #3
0
        public virtual StripeInvoiceLineItem Create(StripeInvoiceItemCreateOptions createOptions)
        {
            var url = this.ApplyAllParameters(createOptions, Urls.InvoiceItems, false);

            var response = Requestor.PostString(url, ApiKey);

            return(Mapper <StripeInvoiceLineItem> .MapFromJson(response));
        }
コード例 #4
0
        public virtual StripeInvoiceLineItem Create(StripeInvoiceItemCreateOptions createOptions)
        {
            var url = this.ApplyAllParameters(createOptions, Urls.InvoiceItems, false);

            var response = Requestor.PostString(url, ApiKey);

            return Mapper<StripeInvoiceLineItem>.MapFromJson(response);
        }
コード例 #5
0
        public virtual StripeInvoiceLineItem Create(StripeInvoiceItemCreateOptions createOptions, StripeRequestOptions requestOptions = null)
        {
            requestOptions = SetupRequestOptions(requestOptions);

            var url = this.ApplyAllParameters(createOptions, Urls.InvoiceItems, false);

            var response = Requestor.Instance.PostString(url, requestOptions);

            return Mapper<StripeInvoiceLineItem>.MapFromJson(response);
        }
コード例 #6
0
        public string InvoiceCreated(InvoiceCreateViewModel request)
        {
            if (request.type == "invoice.created")
            {
                try
                {
                    var invoi = new StripeInvoiceItemService();
                    invoi.ApiKey = "sk_test_4Xusc3Meo8gniONh6dDRZvlp";
                    var invopt = new StripeInvoiceItemCreateOptions();
                    invopt.Amount = [email protected];
                    invopt.Currency = [email protected];
                    invopt.InvoiceId = [email protected];
                    invopt.CustomerId = [email protected];
                    var resInvoice = invoi.Create(invopt);
                }
                catch (StripeException ex)
                {
                    return "Error" + ex.Message;
                }
            }

            return "1";
            //return Json("Sucess", JsonRequestBehavior.AllowGet);
        }