node-red-contrib-line-pay 0.0.1

Node-RED expansion node for LINE Pay

npm install node-red-contrib-line-pay

Platform License npm version npm

日本語版はこちら

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-pay

from Node-RED

  • Select Manage Pallet
  • Click Add Node tab
  • Search node-red-contrib-line-pay
  • Install

Getting Start

  1. Get channel ID and channel secret from https://pay.line.me.
  2. Set URI, channel ID and channel secret to config node.

Chose URI below which you want to use environment.

config node

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.payload sample

{
    "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.payload sample
    {
      "amount": 1000,
      "currency":"JPY" 
    }
    

Capture

Call capture API.

This node requires msg.transactionId.

  • msg.payload sample
    {
      "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.payload sample

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.payload sample

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.payload sample

This request body is option.

{
    "creditCardAuth": true
}

PayPreapproved

Call pay preapproved.

This node requires msg.regKey.

  • msg.payload sample
    {
      "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

flow

This flow source is line_pay_example_flow.json.

Node Info

Version: 0.0.1
Updated 7 months, 2 weeks ago
License: Apache-2.0
Rating: not yet rated

Actions

Rate:

Downloads

2 in the last week

Nodes

  • Request
  • Confirm
  • Capture
  • Void
  • Refund
  • PaymentDetails
  • CheckPaymentStatus
  • CheckRegKey
  • PayPreapproved
  • ExpireRegKey
  • linepay-config

Keywords

  • node-red
  • LINEPay
  • payment
  • API

Maintainers