-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
225a0ee
commit afcabc4
Showing
7 changed files
with
136 additions
and
47 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 綠界 全方位(All In One)金流介接Node.js 第一版 | ||
--- | ||
|
||
## 1. 介紹 | ||
|
||
- 綠界對於有收款需求的會員,提供完整的交易介接API,並有多種收款方式(All In One)可選擇使用。 本套件為Node.js版,可使用作建立訂單,接受付款通知,查詢訂單等金流交易的應用。 | ||
- 收款方式清單: | ||
- 信用卡(一次付清、分期付款、定期定額) | ||
- 網路ATM | ||
- ATM櫃員機 | ||
- 超商代碼 | ||
- 超商條碼 | ||
- Apple Pay | ||
- Google Pay (須特別申請才能使用)(原Android Pay) | ||
|
||
|
||
## 2. 安裝環境 | ||
- node-v6.11.0-x64 以上 | ||
- ECMA Script6 | ||
|
||
|
||
## 3. 使用教學 | ||
- 使用者文件放置於Doc資料夾內,可供參閱 | ||
|
||
|
||
|
||
## 4. 聯絡我們 | ||
- 綠界技術服務工程師信箱: [email protected] | ||
|
||
|
||
|
||
|
||
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* Created by ying.wu on 2017/6/27. | ||
*/ | ||
const ecpay_payment = require('../lib/ecpay_payment.js') | ||
//參數值為[PLEASE MODIFY]者,請在每次測試時給予獨特值 | ||
//若要測試非必帶參數請將base_param內註解的參數依需求取消註解 // | ||
let base_param = { | ||
MerchantTradeNo: 'PLEASE MODIFY', //請帶20碼uid, ex: f0a0d7e9fae1bb72bc93 | ||
MerchantTradeDate: 'PLEASE MODIFY', //ex: 2017/02/13 15:45:30 | ||
TotalAmount: '100', | ||
TradeDesc: '測試交易描述', | ||
ItemName: '測試商品等', | ||
ReturnURL: 'http://192.168.0.1', | ||
// ChooseSubPayment: '', | ||
// OrderResultURL: 'http://192.168.0.1/payment_result', | ||
// NeedExtraPaidInfo: '1', | ||
// ClientBackURL: 'https://www.google.com', | ||
// ItemURL: 'http://item.test.tw', | ||
// Remark: '交易備註', | ||
// HoldTradeAMT: '1', | ||
// StoreID: '', | ||
// CustomField1: '', | ||
// CustomField2: '', | ||
// CustomField3: '', | ||
// CustomField4: '' | ||
} | ||
|
||
|
||
// 若要測試開立電子發票,請將inv_params內的"所有"參數取消註解 // | ||
let inv_params = { | ||
// RelateNumber: 'PLEASE MODIFY', //請帶30碼uid ex: SJDFJGH24FJIL97G73653XM0VOMS4K | ||
// CustomerID: 'MEM_0000001', //會員編號 | ||
// CustomerIdentifier: '', //統一編號 | ||
// CustomerName: '測試買家', | ||
// CustomerAddr: '測試用地址', | ||
// CustomerPhone: '0123456789', | ||
// CustomerEmail: '[email protected]', | ||
// ClearanceMark: '2', | ||
// TaxType: '1', | ||
// CarruerType: '', | ||
// CarruerNum: '', | ||
// Donation: '2', | ||
// LoveCode: '', | ||
// Print: '1', | ||
// InvoiceItemName: '測試商品1|測試商品2', | ||
// InvoiceItemCount: '2|3', | ||
// InvoiceItemWord: '個|包', | ||
// InvoiceItemPrice: '35|10', | ||
// InvoiceItemTaxType: '1|1', | ||
// InvoiceRemark: '測試商品1的說明|測試商品2的說明', | ||
// DelayDay: '0', | ||
// InvType: '07' | ||
} | ||
const options = require('../conf/config-example'), | ||
create = new ecpay_payment(options), | ||
htm = create.payment_client.aio_check_out_applepay(parameters = base_param, invoice = inv_params) | ||
console.log(htm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters