![](/img/trans.png)
[英]How to update AmountDue value by InvoiceId in XERO API using C#
[英]InvoiceId returns null on stripe c#
我在嘗試獲取發票ID時遇到問題,它返回null,這是我的代碼:
var myCharge = new StripeChargeCreateOptions();
myCharge.Amount = (Int32)(amount*100);
myCharge.Currency = "usd";
myCharge.ReceiptEmail = stripeEmail;
myCharge.Description = Description;
myCharge.SourceTokenOrExistingSourceId = stripeToken;
myCharge.Capture = true;
myCharge.CustomerId = customer.Id;
var chargeService = new StripeChargeService(token);
StripeCharge stripeCharge = chargeService.Create(myCharge);
string Invoice= stripeCharge.Invoice.Id;
發票總是以null返回,有人知道原因嗎?
僅當費用是訂閱發票的付款時(即,如果您使用Stripe的Billing API) , 發票屬性才存在於費用對象上。 在這種情況下,您只是在創建未鏈接到任何發票的普通費用,因此該字段為空是正常的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.