本文整理汇总了C#中Invoice.post方法的典型用法代码示例。如果您正苦于以下问题:C# Invoice.post方法的具体用法?C# Invoice.post怎么用?C# Invoice.post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invoice
的用法示例。
在下文中一共展示了Invoice.post方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Index
public ActionResult Index(InvoiceDelayViewModel Model)
{
//1. 設定觸發或延遲開立發票資訊
InvoiceDelay invc = new InvoiceDelay();
invc.MerchantID = Model.MerchantID;
invc.DelayFlag = Model.DelayFlag;
invc.RelateNumber = Model.RelateNumber;
invc.CustomerID = Model.CustomerID;
invc.CustomerIdentifier = Model.CustomerIdentifier;
invc.CustomerAddr = Model.CustomerAddr;
invc.CustomerName = Model.CustomerName;
invc.CustomerPhone = Model.CustomerPhone;
invc.CustomerEmail = Model.CustomerEmail;
invc.ClearanceMark = Model.ClearanceMark;
invc.TaxType = Model.TaxType;
invc.SalesAmount = Model.SalesAmount;
invc.carruerType = Model.CarruerType;
invc.CarruerNum = Model.CarruerNum;
invc.Donation = Model.Donation;
invc.LoveCode = Model.LoveCode;
invc.Print = Model.Print;
invc.Items.Add(new Item()
{
ItemName = Model.ItemName,
ItemPrice = Model.ItemPrice,
ItemCount = Model.ItemCount,
ItemWord = Model.ItemWord,
ItemAmount = Model.ItemAmount
});
invc.InvoiceRemark = Model.InvoiceRemark;
invc.DelayDay = Model.DelayDay;
invc.ECBankID = Model.ECBankID;
invc.Tsr = Model.Tsr;
invc.PayType = Model.PayType;
invc.NotifyURL = Model.NotifyURL;
invc.invType = Model.InvType;
//2. 初始化發票Service物件
Invoice<InvoiceDelay> inv = new Invoice<InvoiceDelay>();
//3. 指定測試環境, 上線時請記得改Prod
inv.Environment = EInvoice.Integration.Enumeration.EnvironmentEnum.Stage;
//4. 設定歐付寶提供的 Key 和 IV
inv.HashIV = "q9jcZX8Ib9LM8wYk";
inv.HashKey = "ejCk326UnaZWKisg";
//5. 執行API的回傳結果(JSON)字串
string json = inv.post(invc);
//6. 解序列化,還原成物件使用
//InvoiceDelayReturn obj = new InvoiceDelayReturn();
//obj = JsonConvert.DeserializeObject<QueryAllowanceReturn>(json);
//obj.XXX;
// ...
ViewBag.message = json;
return View();
}
示例2: Index
public ActionResult Index(QueryInvoiceViewModel model)
{
//1. 設定開立發票資訊
QueryInvoice qinv = new QueryInvoice();
qinv.MerchantID = model.MerchantID;
qinv.RelateNumber = model.RelateNumber;
//2. 初始化發票Service物件
Invoice<QueryInvoice> inv = new Invoice<QueryInvoice>();
//3. 指定測試環境, 上線時請記得改Prod
inv.Environment = EInvoice.Integration.Enumeration.EnvironmentEnum.Stage;
//4. 設定歐付寶提供的 Key 和 IV
inv.HashIV = "q9jcZX8Ib9LM8wYk";
inv.HashKey = "ejCk326UnaZWKisg";
//5. 執行API的回傳結果(JSON)字串
string json = inv.post(qinv);
//6. 解序列化,還原成物件使用
//QueryInvoiceReturn obj = new QueryInvoiceReturn();
//obj = JsonConvert.DeserializeObject<QueryInvoiceReturn>(json);
//obj.XXX;
//obj.XXX;
// ...
ViewBag.message = json;
return View();
}
示例3: Index
public ActionResult Index(AllowanceInvalidViewModel Model)
{
//1. 設定開立折讓作廢資訊
AllowanceInvalid invc = new AllowanceInvalid();
invc.MerchantID = Model.MerchantID;
invc.InvoiceNo = Model.InvoiceNo;
invc.AllowanceNo = Model.AllowanceNo;
invc.Reason = Model.Reason;
//2. 初始化發票Service物件
Invoice<AllowanceInvalid> inv = new Invoice<AllowanceInvalid>();
//3. 指定測試環境, 上線時請記得改Prod
inv.Environment = EInvoice.Integration.Enumeration.EnvironmentEnum.Stage;
//4. 設定歐付寶提供的 Key 和 IV
inv.HashIV = "q9jcZX8Ib9LM8wYk";
inv.HashKey = "ejCk326UnaZWKisg";
//5. 執行API的回傳結果(JSON)字串
string json = inv.post(invc);
//6. 解序列化,還原成物件使用
//AllowanceInvalidReturn obj = new AllowanceInvalidReturn();
//obj = JsonConvert.DeserializeObject<AllowanceInvalidReturn>(json);
//obj.XXX;
// ...
ViewBag.message = json;
return View();
}
示例4: Index
public ActionResult Index(InvoiceTriggerViewModel Model)
{
//1. 設定付款完成觸發或延遲開立發票資訊
InvoiceTrigger invt = new InvoiceTrigger();
invt.MerchantID = Model.MerchantID;
invt.Tsr = Model.Tsr;
invt.PayType = Model.PayType;
//2. 初始化發票Service物件
Invoice<InvoiceTrigger> inv = new Invoice<InvoiceTrigger>();
//3. 指定測試環境, 上線時請記得改Prod
inv.Environment = EInvoice.Integration.Enumeration.EnvironmentEnum.Stage;
//4. 設定歐付寶提供的 Key 和 IV
inv.HashIV = "q9jcZX8Ib9LM8wYk";
inv.HashKey = "ejCk326UnaZWKisg";
//5. 執行API的回傳結果(JSON)字串
string json = inv.post(invt);
//6. 解序列化,還原成物件使用
//InvoiceTriggerReturn obj = new InvoiceTriggerReturn();
//obj = JsonConvert.DeserializeObject<InvoiceTriggerReturn>(json);
//obj.XXX;
// ...
ViewBag.message = json;
return View();
}
示例5: Index
public ActionResult Index(AllowanceViewModel Model)
{
//1. 設定開立折讓資訊
Allowance invc = new Allowance();
invc.MerchantID = Model.MerchantID;
invc.InvoiceNo = Model.InvoiceNo;
invc.allowanceNotify = Model.AllowanceNotify;
invc.CustomerName = Model.CustomerName;
invc.NotifyPhone = Model.NotifyPhone;
invc.NotifyMail = Model.NotifyMail;
invc.AllowanceAmount = Model.AllowanceAmount;
invc.Items.Add(new Item()
{
ItemName = Model.ItemName,
ItemPrice = Model.ItemPrice,
ItemCount = Model.ItemCount,
ItemWord = Model.ItemWord,
ItemAmount = Model.ItemAmount
});
//2. 初始化發票Service物件
Invoice<Allowance> inv = new Invoice<Allowance>();
//3. 指定測試環境, 上線時請記得改Prod
inv.Environment = EInvoice.Integration.Enumeration.EnvironmentEnum.Stage;
//4. 設定歐付寶提供的 Key 和 IV
inv.HashIV = "q9jcZX8Ib9LM8wYk";
inv.HashKey = "ejCk326UnaZWKisg";
//5. 執行API的回傳結果(JSON)字串
string json = inv.post(invc);
//6. 解序列化,還原成物件使用
//AllowanceReturn obj = new AllowanceReturn();
//obj = JsonConvert.DeserializeObject<AllowanceReturn>(json);
//obj.XXX;
// ...
ViewBag.message = json;
return View();
}
示例6: Index
public ActionResult Index(InvoiceNotifyViewModel Model)
{
////1. 設定發送通知資訊
InvoiceNotify invn = new InvoiceNotify();
invn.MerchantID = Model.MerchantID;
invn.InvoiceNo = Model.InvoiceNo;
invn.AllowanceNo = Model.AllowanceNo;
invn.Phone = Model.Phone;
invn.NotifyMail = Model.NotifyMail;
invn.notify = Model.Notify;
invn.invoiceTag = Model.InvoiceTag;
invn.notified = Model.Notified;
//2. 初始化發票Service物件
Invoice<InvoiceNotify> inv = new Invoice<InvoiceNotify>();
//3. 指定測試環境, 上線時請記得改Prod
inv.Environment = EInvoice.Integration.Enumeration.EnvironmentEnum.Stage;
//4. 設定歐付寶提供的 Key 和 IV
inv.HashIV = "q9jcZX8Ib9LM8wYk";
inv.HashKey = "ejCk326UnaZWKisg";
//5. 執行API的回傳結果(JSON)字串
string json = inv.post(invn);
//6. 解序列化,還原成物件使用
//InvoiceNotifyReturn obj = new InvoiceNotifyReturn();
//obj = JsonConvert.DeserializeObject<InvoiceNotifyReturn>(json);
//obj.XXX;
// ...
ViewBag.message = json;
return View();
}