[
{
"id": "7ba7e85e9e28d445",
"type": "tab",
"label": "LINE Pay Sample",
"disabled": false,
"info": ""
},
{
"id": "066997af19884045",
"type": "debug",
"z": "7ba7e85e9e28d445",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 670,
"y": 160,
"wires": []
},
{
"id": "91b5d2a05b2f1ea3",
"type": "function",
"z": "7ba7e85e9e28d445",
"name": "",
"func": "msg.payload = {\n \"amount\" : 100,\n \"currency\" : \"JPY\",\n \"orderId\" : `MKSI_S_${new Date().getTime()}`,\n \"packages\": [\n {\n \"id\": \"package-999\",\n \"amount\": 100,\n \"name\": \"sample product\",\n \"products\": [\n {\n \"id\": \"product-001\",\n \"name\": \"Pen Brown\",\n \"imageUrl\": \"https://www.linefriends.jp/m/img/ic-brown_00_v03.7d3c4e0d.png\",\n \"quantity\": 1,\n \"price\": 100\n }\n ]\n }\n ],\n \"redirectUrls\" : {\n \"confirmUrl\" : \"http://localhost:1880/confirm\",\n \"cancelUrl\" : \"http://localhost:1880/cancel\"\n },\n \"options\": {\n \"payment\": {\n \"capture\": false,\n \"payType\": \"PREAPPROVED\"\n }\n },\n};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 120,
"wires": [
[
"e2af6ddab54c889f"
]
]
},
{
"id": "ff7122af06c92d77",
"type": "debug",
"z": "7ba7e85e9e28d445",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 260,
"wires": []
},
{
"id": "53492a36eab37865",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "/confirm",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 230,
"y": 220,
"wires": [
[
"febae951e48e5c75"
]
]
},
{
"id": "3d9e6073dd2aa44c",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 930,
"y": 220,
"wires": []
},
{
"id": "b4a9a6fb67999887",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "/checkout",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 220,
"y": 120,
"wires": [
[
"91b5d2a05b2f1ea3"
]
]
},
{
"id": "93e8a01b695c74f8",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 930,
"y": 120,
"wires": []
},
{
"id": "a6a676804b5478fd",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "
\n \n\n\n\n \n\n",
"output": "str",
"x": 760,
"y": 120,
"wires": [
[
"93e8a01b695c74f8"
]
]
},
{
"id": "129777c73a8965fe",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "capture",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 230,
"y": 320,
"wires": [
[
"5445e4d62a6c8177"
]
]
},
{
"id": "610a4f035aceb6d7",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 1010,
"y": 320,
"wires": []
},
{
"id": "7ffb5fccf216c994",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "\n \n\n\n \n {{#payload.info}}\n
Capture Completed!
\n Order ID: {{payload.info.orderId}}\n
\n
\n \n \n
\n
\n {{/payload.info}}\n {{^payload.info}}\n
Capture Failed
\n
{{payload.returnMessage}}
\n {{/payload.info}} \n
\n\n\n\n ",
"output": "str",
"x": 840,
"y": 320,
"wires": [
[
"610a4f035aceb6d7"
]
]
},
{
"id": "9ae943965f9d21d8",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "void",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 240,
"y": 380,
"wires": [
[
"e3051140b954fbf0"
]
]
},
{
"id": "fe1b4c901b2d16b8",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 1010,
"y": 380,
"wires": []
},
{
"id": "e82ca0c512298eaf",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "refund",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 230,
"y": 440,
"wires": [
[
"29c0d9964a932cba"
]
]
},
{
"id": "01b847c360bca8ca",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 1010,
"y": 440,
"wires": []
},
{
"id": "73a63a493b9a786d",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "\n \n\n\n \n {{#payload.info}}\n
Refund Completed!
\n
\n {{/payload.info}}\n {{^payload.info}}\n
Refund Failed
\n
{{payload.returnMessage}}
\n {{/payload.info}} \n
\n\n ",
"output": "str",
"x": 840,
"y": 440,
"wires": [
[
"01b847c360bca8ca"
]
]
},
{
"id": "7bfe16d60b5b36eb",
"type": "function",
"z": "7ba7e85e9e28d445",
"name": "",
"func": "msg.transactionId = msg.req.query.transactionId;\nmsg.payload = {\n orderId: msg.req.query.orderId,\n fields: msg.req.query.fields\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 500,
"wires": [
[
"1d97852b2e543ac9"
]
]
},
{
"id": "82c8b6c88916de1a",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "detail",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 240,
"y": 500,
"wires": [
[
"7bfe16d60b5b36eb"
]
]
},
{
"id": "292409f335fe1580",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 1010,
"y": 500,
"wires": []
},
{
"id": "8f1f79a9059dcedf",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "check_regkey",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 210,
"y": 560,
"wires": [
[
"37b565f559cebaf9"
]
]
},
{
"id": "d05002bea668fe02",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 1010,
"y": 560,
"wires": []
},
{
"id": "5ba887a8b456c188",
"type": "function",
"z": "7ba7e85e9e28d445",
"name": "",
"func": "msg.regKey = msg.req.query.regKey;\nmsg.payload = {\n productName:\"subscription\",\n amount: 100,\n currency: \"JPY\",\n orderId: `MKSI_S_${new Date().getTime()}`\n};\nmsg.reqBody = msg.payload;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 620,
"wires": [
[
"eb622acede9cc4ce"
]
]
},
{
"id": "a118ff434f75e780",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "pay_preapproved",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 200,
"y": 620,
"wires": [
[
"5ba887a8b456c188"
]
]
},
{
"id": "644dca4fe13ccb0b",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 1010,
"y": 620,
"wires": []
},
{
"id": "29c0d9964a932cba",
"type": "change",
"z": "7ba7e85e9e28d445",
"name": "",
"rules": [
{
"t": "set",
"p": "transactionId",
"pt": "msg",
"to": "req.query.transactionId",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 440,
"wires": [
[
"7784a43530781dbc"
]
]
},
{
"id": "37b565f559cebaf9",
"type": "change",
"z": "7ba7e85e9e28d445",
"name": "",
"rules": [
{
"t": "set",
"p": "regKey",
"pt": "msg",
"to": "req.query.regKey",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 560,
"wires": [
[
"789764f9ab5b8ff6"
]
]
},
{
"id": "ed3a2ac07c87e08d",
"type": "http in",
"z": "7ba7e85e9e28d445",
"name": "",
"url": "expire_regkey",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 210,
"y": 680,
"wires": [
[
"4ecf842a54523c91"
]
]
},
{
"id": "d4debe18900f1dc1",
"type": "http response",
"z": "7ba7e85e9e28d445",
"name": "",
"statusCode": "",
"headers": {},
"x": 1010,
"y": 680,
"wires": []
},
{
"id": "4ecf842a54523c91",
"type": "change",
"z": "7ba7e85e9e28d445",
"name": "",
"rules": [
{
"t": "set",
"p": "regKey",
"pt": "msg",
"to": "req.query.regKey",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 680,
"wires": [
[
"9c92d47d6bc7d75d"
]
]
},
{
"id": "e2af6ddab54c889f",
"type": "Request",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 560,
"y": 120,
"wires": [
[
"a6a676804b5478fd",
"066997af19884045"
]
]
},
{
"id": "49e140fd3a94ba85",
"type": "Confirm",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 600,
"y": 220,
"wires": [
[
"e41280ce9f128ab2",
"bb15b45f167a8f48"
]
]
},
{
"id": "e41280ce9f128ab2",
"type": "CheckPaymentStatus",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 520,
"y": 260,
"wires": [
[
"ff7122af06c92d77"
]
]
},
{
"id": "84121948bd2e9d78",
"type": "Capture",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 640,
"y": 320,
"wires": [
[
"7ffb5fccf216c994"
]
]
},
{
"id": "771d6e88558130c3",
"type": "Void",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 630,
"y": 380,
"wires": [
[
"7ac0adb0b180ca44"
]
]
},
{
"id": "7784a43530781dbc",
"type": "Refund",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 640,
"y": 440,
"wires": [
[
"73a63a493b9a786d"
]
]
},
{
"id": "1d97852b2e543ac9",
"type": "PaymentDetails",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 640,
"y": 500,
"wires": [
[
"90b8bc9bd1478b6c"
]
]
},
{
"id": "789764f9ab5b8ff6",
"type": "CheckRegKey",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 640,
"y": 560,
"wires": [
[
"ecaf1a45f9197580"
]
]
},
{
"id": "eb622acede9cc4ce",
"type": "PayPreapproved",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 630,
"y": 620,
"wires": [
[
"f26baaac6f728f61"
]
]
},
{
"id": "9c92d47d6bc7d75d",
"type": "ExpireRegKey",
"z": "7ba7e85e9e28d445",
"name": "",
"linepayConfig": "",
"x": 640,
"y": 680,
"wires": [
[
"e7c1cee54d14d324"
]
]
},
{
"id": "7ac0adb0b180ca44",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{{payload.returnMessage}}",
"output": "str",
"x": 840,
"y": 380,
"wires": [
[
"fe1b4c901b2d16b8"
]
]
},
{
"id": "f26baaac6f728f61",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "\n \n\n\n \n {{#payload.info}}\n
Preapproved Completed!
\n Order ID: {{reqBody.orderId}}\n
\n
\n \n \n
\n
\n {{/payload.info}}\n {{^payload.info}}\n
Preapproved Failed
\n
{{payload.returnMessage}}
\n {{/payload.info}} \n
\n\n\n\n ",
"output": "str",
"x": 840,
"y": 620,
"wires": [
[
"644dca4fe13ccb0b"
]
]
},
{
"id": "e7c1cee54d14d324",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{{payload.returnMessage}}",
"output": "str",
"x": 840,
"y": 680,
"wires": [
[
"d4debe18900f1dc1"
]
]
},
{
"id": "bb15b45f167a8f48",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "\n \n\n\n \n
Finish Confirm
\n {{#payload.info}}\n
Basic
\n
\n
\n \n \n \n \n
\n
\n {{ #payload.info.regKey }}\n
Subscription
\n
\n
\n \n \n \n
\n
\n {{ /payload.info.regKey }}\n {{/payload.info}}\n {{^payload.info}}\n
Confirm Failed
\n {{payload.returnMessage}}\n {{/payload.info}}\n
\n\n",
"output": "str",
"x": 760,
"y": 220,
"wires": [
[
"3d9e6073dd2aa44c"
]
]
},
{
"id": "90b8bc9bd1478b6c",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "\n \n\n\n\n \n {{#payload.info}}\n
Payment Detail
\n
\n \n \n Transaction ID | \n {{payload.info.0.transactionId}} | \n
\n \n Transaction Date | \n {{payload.info.0.transactionDate}} | \n
\n \n Transaction Type | \n {{payload.info.0.transactionType}} | \n
\n \n Order ID | \n {{payload.info.0.orderId}} | \n
\n \n Product Name | \n {{payload.info.0.productName}} | \n
\n \n Pay Status | \n {{payload.info.0.payStatus}} | \n
\n \n
\n {{/payload.info}}\n {{^payload.info}}\n
Error
\n {{payload.returnMessage}}\n {{/payload.info}}\n
\n\n",
"output": "str",
"x": 840,
"y": 500,
"wires": [
[
"292409f335fe1580"
]
]
},
{
"id": "ecaf1a45f9197580",
"type": "template",
"z": "7ba7e85e9e28d445",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{{payload.returnMessage}}",
"output": "str",
"x": 840,
"y": 560,
"wires": [
[
"d05002bea668fe02"
]
]
},
{
"id": "febae951e48e5c75",
"type": "change",
"z": "7ba7e85e9e28d445",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"amount\":100,\"currency\":\"JPY\"}",
"tot": "json"
},
{
"t": "set",
"p": "transactionId",
"pt": "msg",
"to": "req.query.transactionId",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 220,
"wires": [
[
"49e140fd3a94ba85"
]
]
},
{
"id": "5445e4d62a6c8177",
"type": "change",
"z": "7ba7e85e9e28d445",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"amount\":100,\"currency\":\"JPY\"}",
"tot": "json"
},
{
"t": "set",
"p": "transactionId",
"pt": "msg",
"to": "req.query.transactionId",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 320,
"wires": [
[
"84121948bd2e9d78"
]
]
},
{
"id": "e3051140b954fbf0",
"type": "change",
"z": "7ba7e85e9e28d445",
"name": "",
"rules": [
{
"t": "set",
"p": "transactionId",
"pt": "msg",
"to": "req.query.transactionId",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 380,
"wires": [
[
"771d6e88558130c3"
]
]
}
]