当前位置: 首页>>代码示例>>C#>>正文


C# Invoice.post方法代码示例

本文整理汇总了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();
        }
开发者ID:PyngChen,项目名称:.Net,代码行数:60,代码来源:InvoiceDelayController.cs

示例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();
        }
开发者ID:vc2001,项目名称:.Net,代码行数:31,代码来源:QueryInvoiceController.cs

示例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();

        }
开发者ID:vc2001,项目名称:.Net,代码行数:33,代码来源:AllowanceInvalidController.cs

示例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();
        }
开发者ID:vc2001,项目名称:.Net,代码行数:32,代码来源:InvoiceTriggerController.cs

示例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();
        }
开发者ID:vc2001,项目名称:.Net,代码行数:43,代码来源:AllowanceController.cs

示例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();
        }
开发者ID:vc2001,项目名称:.Net,代码行数:38,代码来源:InvoiceNotifyController.cs


注:本文中的Invoice.post方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。