node-red-contrib-line-pay v0.0.1
node-red-contrib-line-pay
日本語版はこちら
Node-RED expansion node for LINE Pay
This node uses LINE Pay API V3.
Install
npm
$ cd ~/.node-red
$ npm install node-red-contrib-line-payfrom Node-RED
- Select
Manage Pallet - Click
Add Nodetab - Search
node-red-contrib-line-pay - Install
Getting Start
- Get channel ID and channel secret from https://pay.line.me.
Set URI, channel ID and channel secret to config node.
Chose URI below which you want to use environment.
- sandbox: https://sandbox-api-pay.line.me
- production: https://api-pay.line.me

Nodes
Common
- A node which requires transaction ID, set transaction ID as
msg.transactionId. - A node which requires RegKey, set RegKey as
msg.regKey. - Another params, set
msg.payload.
Request
Call request API.
msg.payloadsample
{
"amount" : 100,
"currency" : "JPY",
"orderId" : "MKSI_S_20180904_1000001",
"packages" : [
{
"id" : "1",
"amount": 100,
"products" : [
{
"id" : "PEN-B-001",
"name" : "Pen Brown",
"imageUrl" : "https://pay-store.line.com/images/pen_brown.jpg",
"quantity" : 2,
"price" : 50
}
]
}
],
"redirectUrls" : {
"confirmUrl" : "https://pay-store.line.com/order/payment/authorize",
"cancelUrl" : "https://pay-store.line.com/order/payment/cancel"
},
"options" : {
"extra" : {
"branchName" : "BRANCH_NAME",
"branchId" : "BRANCH_ID"
}
}
}Confirm
Call confirm API.
This node requires msg.transactionId.
msg.payloadsample
{
"amount": 1000,
"currency":"JPY"
}Capture
Call capture API.
This node requires msg.transactionId.
msg.payloadsample
{
"amount": 1000,
"currency":"JPY"
}Void
Call capture API.
This node requires msg.transactionId.
No require msg.payload.
Refund
Call refund API.
This node requires msg.transactionId.
msg.payloadsample
This request body is option.
If msg.payload is undefined, this API returns refund all price.
{
"refundAmount": 1000
}Detail
Call payment detail API.
This node requires msg.transactionId or msg.payload.orderId.
msg.payloadsample
msg.payload.fields is option.
{
"orderId": "1002045572",
"fields": "ORDER"
}CheckPaymentStatus
Call payment status API.
This node requires msg.transactionId.
No require msg.payload.
CheckRegKey
Call check regKey API.
This node requires msg.regKey.
msg.payloadsample
This request body is option.
{
"creditCardAuth": true
}PayPreapproved
Call pay preapproved.
This node requires msg.regKey.
msg.payloadsample
{
"productName":"Brown pen",
"amount": 1000,
"currency":"JPY",
"orderId":"Ord2018123100000001"
}ExpireRegKey
Call Expire regKey API.
This node requires msg.regKey.
No require msg.payload.
Example Flow

This flow source is line_pay_example_flow.json.
4 years ago