Giter VIP home page Giter VIP logo

newebpay-client's Introduction

Newebpay::Client (開發中)

newebpay-client 是串接藍新金流 API 的 rails gem。

目前狀態為開發中,請優先使用別的 newebpay 相關 gem 來達到您的需求(比如文末的參考資料)。

藍新金流 API

註冊藍新帳號

信用卡卡號 for 測試

  • 4000-2211-1111-1111
  • 有效年月:大於今日
  • 末三碼:任意

安裝

Gemfile:

gem 'newebpay-client'

執行:

$ bundle install

建立 config/initializers/newebpay.rb

$ rails generate newebpay:install

設定 config/initializers/newebpay.rb

- config.production_mode # 0: 開發環境 / 1: 正式站,預設為 0
- config.marchant_id # 商店 ID
- config.hash_key
- config.hash_iv

Usage

TODO: Write usage instructions here

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pct/newebpay-client.

License

The gem is available as open source under the terms of the MIT License.

TODO

線上交易─幕前支付

  • MPG交易(多功能收款) [NPA-F01] /MPG/mpg_gateway
  • 單筆交易查詢 [NPA-B02] /API/QueryTradeInfo
  • 信用卡取消授權 [NPA-B01] /API/CreditCard/Cancel
  • 信用卡請款/退款、取消請款/取消退款 [NPA-B031 ~ 34] /API/CreditCard/Close
  • 電子錢包退款 [NPA-B06] /API/EWallet/refund

信用卡定期定額

  • 建立委託 [NPA-B05] /MPG/period
  • 回應參數-每期授權完成 [NPA-N050]
  • 修改委託狀態 [NPA-B051] /MPG/period/AlterStatus
  • 修改委託內容 [NPA-B052] /MPG/period/AlterAmt (可更動委託金額)

捐款平台

  • 捐款平台

參考資料

此套件寫法參考了 github 上面 ruby, php, .net 等相關的 newebpay/spgateway 套件細節,以及感謝 ChatGPT 的 ruby gem 撰寫教學

特別感謝這些相關套件:

newebpay-client's People

Contributors

pct avatar

Watchers

 avatar  avatar

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.