Git Product home page Git Product logo

go-ecpay-sdk's People

Contributors

dependabot[bot] avatar laysdragon avatar ruisi-lu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-ecpay-sdk's Issues

API Implementation works

There is still some API Request and Return Data need to implement.

  • Request
    • AioCheckOut

      5.產生訂單

    • QueryTradeInfo

      8.查詢訂單

    • QueryTrade

      9.查詢信用卡單筆明細記錄

    • QueryPaymentInfo

      10.查詢 ATM/CVS/BARCODE 取號結果

    • CreditDetail

      11.信用卡請退款功能

    • QueryCreditCardPeriodInfo

      13.信用卡定期定額訂單查詢

  • Return Data
    • OrderResult(ReturnURL/OrderResultURL)

      7.付款結果通知 - 應用場景Ⅰ

    • PeriodOrderResult (PeriodReturnURL)

      7.付款結果通知 - 應用場景Ⅱ

    • PaymentInfo (PaymentInfoURL)

      6.ATM、CVS 或 BARCODE 的取號結果通知

    • NeedExtraPaidInfo

      12.額外回傳的參數

TODO

  • 產生發票參數的API檢查

Docs improved

now the docs is still broken and need more info .

  • godocs friendly comment and example code
  • improved generated code templated
    • add comments to missing comment func
    • remain the multi lines in openapi definition
    • add comments to enum
    • improved the enum naming
  • docs for gin validator handler
  • better field comments and docs
  • docs for return data binding helper
  • docs for generated order html usage with ecpay
  • add comments to these missing comments func

gin binding helper improved

now gin have problem to deal with custom format time form application/x-www-form-urlencoded.
That curse the problem to binding with gin's implementation for current version, even a pull request have already sent. but it still need a better way to deal with this for older version even the new version come out with fix.
Checkout the detail here gin-gonic/gin#2510

It would better to use regex to replace and quoted the certain time string in the data instead of decode and encode complete.

func QuotedAndBindingData(data interface{}, quotedfields []string, c *gin.Context) error {
body, err := c.GetRawData()
if err != nil {
return err
}
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(body))
err = c.Request.ParseForm()
if err != nil {
return err
}
quotedValues(c.Request.PostForm, quotedfields)
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer([]byte(c.Request.PostForm.Encode())))
err = c.MustBindWith(data, binding.FormPost)
if err != nil {
return err
}
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(body))
return nil
}

同学,您这个项目引入了100个开源组件,存在2个漏洞,辛苦升级一下

检测到 Laysi/go-ecpay-sdk 一共引入了100个开源组件,存在2个漏洞

漏洞标题:jwt-go 安全漏洞
缺陷组件:github.com/dgrijalva/[email protected]+incompatible
漏洞编号:CVE-2020-26160
漏洞描述:jwt-go是个人开发者的一个Go语言的JWT实现。
jwt-go 4.0.0-preview1之前版本存在安全漏洞。攻击者可利用该漏洞在使用[]string{} for m[\"aud\"](规范允许)的情况下绕过预期的访问限制。
影响范围:(∞, 4.0.0-preview1)
最小修复版本:4.0.0-preview1
缺陷组件引入路径:github.com/Laysi/go-ecpay-sdk@->github.com/dgrijalva/[email protected]+incompatible

另外还有2个漏洞,详细报告:https://mofeisec.com/jr?p=a86d6b

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.