Giter VIP home page Giter VIP logo

twpay_api's Introduction

台灣Pay產生器API

2022/11/01更新:新增D97有效期限欄位

配合華南銀行領導之QR Code標準更新,新增D97有效期限欄位,預設為無期限(D97=99991231235959)

2021/10/24更新:感謝kevin823lin提供js版本~

註:「PHP」與「JS+HTML」版本互相獨立,可擇一版本使用即可,無需同時下載所有檔案。

API 呼叫網址: https://i-tw.org/twpay/api
資料傳送方式: GET
資料反送方式: JSON String

適用場景:

  • 網路賣家可透過平台API介接功能,將虛擬帳號及訂單金額製作成QR Code供買家掃碼。
  • 攤販商家可產生包含購物金額的條碼,避免客入於主掃交易時輸錯金額造成的爭議。
需求參數:
Bank   必填     3 位數字 銀行代碼
Acc    必填  1-16 位數字 帳號/銷帳編號
Amount 選填  1- 7 位數字 金額(若未設定此參數,則掃碼者可自行調整金額;不合法的參數將忽略)
Memo   選填  1-19 位字串 備註(超過19字元之部分將忽略)
Redir  選填 NULL或99~547 有設定此參數時,自動導引至QR圖片(數字為圖片像素)
                        未設定此參數時,將回傳JSON String

回傳參數
Success (產製結果): 0表示條碼產生失敗,1表示條碼產生成功
Msg     (錯誤資訊): 條碼產生失敗的原因說明
String  (編碼內容): QR Code的編碼內容,可以此字串自行產生QR Code
QR      (條碼連結): 使用Google API產生的QR Code圖片網址

API使用範例
假設要產生「臺灣銀行(004)」,帳號「12345678」且金額為「100元」的台灣Pay條碼
API呼叫連結為: https://i-tw.org/twpay/api?Bank=004&Acc=12345678&Amount=100

如果不想要字串,想要直接導引至QR Code圖片位置,則在後方加上 &Redir 即可
即: https://i-tw.org/twpay/api?Bank=004&Acc=12345678&Amount=100&Redir
「Redir」可指定數字,用來調整條碼的大小,如「Redir=400」,產出400x400px的條碼。

twpay_api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

twpay_api's Issues

是否可支援手機門號轉帳?

目前的功能是轉帳到銀行帳號,請問是否可支援轉帳到手機門號?
理由: 因為現在已經開放使用手機門號當作是銀行帳號,付款者轉帳時可更容易辨識帳號。謝謝。

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.