Foxtable(狐表)用户栏目专家坐堂 → [求助]AES加解密问题


  共有2623人关注过本帖树形打印复制链接

主题:[求助]AES加解密问题

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107718 积分:547917 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/7 14:38:00 [显示全部帖子]

请找服务商提供接口开发文档和.net示例

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107718 积分:547917 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/7 15:54:00 [显示全部帖子]

里面提供了sdk,直接使用即可,下载3楼链接里的内容,解压。

1、把目录“SDK元件”里的Ecpay.EInvoice.Integration.dll复制到foxtable安装目录,然后添加引用:http://www.foxtable.com/webhelp/topics/1936.htm
2、打开foxtable安装目录里的Foxtable.exe.config,在以下节点添加红字的这部分内容即可:

……  

  <runtime>  

    <AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false" />  

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  

      <dependentAssembly>  

        <assemblyIdentity name="C1.C1Zip.4"  

          publicKeyToken="79882d576c6336da"  

          culture="neutral" />  

        <bindingRedirect oldVersion="4.0.20191.359" newVersion="4.0.20183.338" />  

      </dependentAssembly>  

      <dependentAssembly>  

        <assemblyIdentity name="C1.Win.Bitmap.4"  

          publicKeyToken="944ae1ea0e47ca04"  

          culture="neutral" />  

        <bindingRedirect oldVersion="4.0.20183.338" newVersion="4.0.20191.359" />  

      </dependentAssembly>  

      <dependentAssembly>  

        <assemblyIdentity name="C1.C1Excel.4"  

          publicKeyToken="79882d576c6336da"  

          culture="neutral" />  

        <bindingRedirect oldVersion="4.0.20191.359" newVersion="4.0.20183.338" />  

      </dependentAssembly>  

      <dependentAssembly>  

        <assemblyIdentity name="Newtonsoft.Json"  

          publicKeyToken="30ad4fe6b2a6aeed"  

          culture="neutral" />  

        <bindingRedirect oldVersion="7.0.0.0" newVersion="12.0.0.0" />  

      </dependentAssembly>  

    </assemblyBinding>  

  </runtime>  

……

添加后保存。最后记得备份一下Foxtable.exe.config,因为如果升级Foxtable新版本,这个文件会被覆盖,需要重新改一下。

3、到目录“Sample Code”里找到对应要做的功能的目录。比如04.一般立fa piao,使用vs打开,或者找到其中的Issue.aspx.cs文件使用文本编辑器打开,转换为vb.net代码使用:http://converter.telerik.com/,转换后补上完整的命名空间(如下红字),如:
Dim invc As New Ecpay.EInvoice.Integration.Models.InvoiceCreate()
invc.MerchantID = "2000132"
invc.RelateNumber = "ecPay" & New Random().[Next](0, 99999).ToString()
invc.CustomerID = ""
invc.CustomerIdentifier = ""
invc.CustomerName = ""
invc.CustomerAddr = "客戶地址"
invc.CustomerPh
invc.CustomerEmail = "test@ecpay.com.tw"
invc.Print = Ecpay.EInvoice.Integration.Enumeration.PrintEnum.No
invc.Donation = Ecpay.EInvoice.Integration.Enumeration.DonationEnum.No
invc.LoveCode = ""
invc.carruerType = Ecpay.EInvoice.Integration.Enumeration.CarruerTypeEnum.PhoneBarcode
invc.CarruerNum = "/6G+X3LQ"
invc.CarruerNum = invc.CarruerNum.Replace("+"c, " "c)
invc.SalesAmount = "300"
invc.InvoiceRemark = "(qwrrg)"
invc.invType = Ecpay.EInvoice.Integration.Enumeration.TheWordTypeEnum.Normal
Dim item As New Ecpay.EInvoice.Integration.Models.Item()
With item
    .ItemName = "糧食"
    .ItemCount = "1"
    .ItemWord = "個"
    .ItemPrice = "100.1"
    .ItemAmount = "100.1"
End With
invc.Items.Add(item)
item = New Ecpay.EInvoice.Integration.Models.Item()
With item
    .ItemName = "糧食"
    .ItemPrice = "200"
    .ItemCount = "1"
    .ItemWord = "個"
    .ItemAmount = "200"
End With
invc.Items.Add(item)
Dim inv As New Ecpay.EInvoice.Integration.Service.Invoice(Of Ecpay.EInvoice.Integration.Models.InvoiceCreate)()
inv.Environment = Ecpay.EInvoice.Integration.Enumeration.EnvironmentEnum.Stage
inv.HashIV = "q9jcZX8Ib9LM8wYk"
inv.HashKey = "ejCk326UnaZWKisg"
Dim json As String = inv.post(invc) '调用接口
msgbox(json) '查看返回结果

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107718 积分:547917 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/7 16:23:00 [显示全部帖子]

SDK已经把相关功能都封装好了,不需要在自行处理

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107718 积分:547917 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/7 17:16:00 [显示全部帖子]

如果使用4楼的代码,不需要再加什么别名。

如果要加,自己把红字代码改为别名

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107718 积分:547917 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/8 20:14:00 [显示全部帖子]

这种用法所有版本都可以使用,包括试用版

 回到顶部