Socket
Socket
Sign inDemoInstall

node-red-contrib-codef

Package Overview
Dependencies
133
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-red-contrib-codef

A node-red module to call codef api


Version published
Weekly downloads
11
increased by1000%
Maintainers
1
Install size
10.4 MB
Created
Weekly downloads
 

Readme

Source

node-red-contrib-codef

Node-RED

easycodef-node wrapper.

Install

Run the following command in the root directory of your Node-RED install:

npm install node-red-contrib-codef --save

How to use

서비스 타입 설정 및 키 설정 - codef node에 설정
  - 샌드박스 : SERVICE_TYPE=SERVICE_TYPE_SANDBOX
  - 데모 : SERVICE_TYPE=SERVICE_TYPE_DEMO
  - 운영 : SERVICE_TYPE=SERVICE_TYPE_API
  
요청 파라미터 설정
응답 결과 확인

To use node-red-contrib-codef, you must first create an authentication key.

Save the generated authentication key information to codef node config.

#- 샌드박스 : EasyCodefConstant.SERVICE_TYPE
#- 데모 : EasyCodefConstant.SERVICE_TYPE_DEMO
#- 운영 : EasyCodefConstant.SERVICE_TYPE_API

CLIENT_ID=
CLIENT_SECRET=
PUBLIC_KEY=
SERVICE_TYPE=SERVICE_TYPE_SANDBOX or SERVICE_TYPE_API or SERVICE_TYPE_DEMO

codef

codef api request node.

action parameter

  • need action
    • createAccount
    • addAccount
    • updateAccount
    • deleteAccount
    • /v1/kr/card/p/account/card-list : 카드 보유 리스트
    • /v1/kr/bank/b/account/account-list : 은행 보유 계좌 리스트
    • refer to other api on https://developer.codef.io/products

param parameter

  • need param

accountList parameter

  • need accountList if action is createAccount, addAccount, updateAccount, deleteAccount

request parameter sample

msg.action = 'createAccount';
msg.accountList = [];
const accountIDPWD = {
  countryCode: 'KR',
  businessType: 'BK',
  clientType: 'P',
  organization: '0081',
  loginType: '1',
  id: 'user_id',
  password: 'user_password'
};

msg.accountList.push(accountIDPWD);

// get card list
msg.action = '/v1/kr/card/p/account/card-list';
msg.param = {
  connectedId: 'byi1wYwD40k8hEIiXl6bRF',
  organization: '0309',
  birthDate : '',
  inquiryType: '0'
};
return msg;

sample flow


[{"id":"63d6961d.1a8c38","type":"codef","z":"d4ad27e3.29f578","action":"","x":710,"y":60,"wires":[["68b7fffa.020c3"]]},{"id":"aa25d4a6.53fbd8","type":"inject","z":"d4ad27e3.29f578","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":60,"wires":[["c6a832a5.dc6f8"]]},{"id":"3e5c27f0.1fa6d8","type":"debug","z":"d4ad27e3.29f578","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1210,"y":60,"wires":[]},{"id":"c6a832a5.dc6f8","type":"function","z":"d4ad27e3.29f578","name":"createAccount","func":"// create account\nmsg.action = 'createAccount';\nmsg.accountList = [];\nconst accountIDPWD = {\n  countryCode: 'KR',\n  businessType: 'BK',\n  clientType: 'P',\n  organization: '0081',\n  loginType: '1',\n  id: 'user_id',\n  password: 'user_password'\n};\n\nmsg.accountList.push(accountIDPWD);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":60,"wires":[["63d6961d.1a8c38"]]},{"id":"52aae555.6a6dbc","type":"function","z":"d4ad27e3.29f578","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1020,"y":60,"wires":[["3e5c27f0.1fa6d8"]]},{"id":"68b7fffa.020c3","type":"json","z":"d4ad27e3.29f578","name":"","property":"payload","action":"","pretty":false,"x":850,"y":60,"wires":[["52aae555.6a6dbc"]]},{"id":"358c95f7.f7504a","type":"function","z":"d4ad27e3.29f578","name":"/v1/kr/card/p/account/card-list","func":"// get card list\nmsg.action = '/v1/kr/card/p/account/card-list';\n\nmsg.param = {\n  connectedId: 'byi1wYwD40k8hEIiXl6bRF',\n  organization: '0309',\n  birthDate : '',\n  inquiryType: '0'\n};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":320,"y":100,"wires":[["63d6961d.1a8c38"]]},{"id":"ca3d68db.7fa998","type":"function","z":"d4ad27e3.29f578","name":"/v1/kr/bank/p/account/transaction-list","func":"// get transaction list\nmsg.action = '/v1/kr/bank/p/account/transaction-list';\nmsg.param = {\n  connectedId: 'byi1wYwD40k8hEIiXl6bRF',\n  organization: '0309',\n  account : '1002440000000',\n  orderBy : '0',\n  startDate : '20200101',\n  endDate: '20201202'\n};\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":350,"y":140,"wires":[["63d6961d.1a8c38"]]},{"id":"36310e47.03c5c2","type":"inject","z":"d4ad27e3.29f578","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":100,"wires":[["358c95f7.f7504a"]]},{"id":"a7926daa.cbec7","type":"inject","z":"d4ad27e3.29f578","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":140,"wires":[["ca3d68db.7fa998"]]}]

result

{
  "result": {
    "code": "CF-00000",
    "extraMessage": "",
    "message": "성공",
    "transactionId": "5069429e367745baba92f5c12c4343de"
  },
  "data": [
    {
      "resCardType": "체크/본인",
      "resValidPeriod": "",
      "resCardName": "OO체크카드-국제ATM",
      "resTrafficYN": "불가능",
      "resIssueDate": "",
      "resUserNm": "***",
      "resSleepYN": "",
      "resCardNo": "6056********0000"
    },
    {
      "resCardType": "신용/본인",
      "resValidPeriod": "",
      "resCardName": "할인카드",
      "resTrafficYN": "불가능",
      "resIssueDate": "",
      "resUserNm": "***",
      "resSleepYN": "",
      "resCardNo": "6253********0000"
    },
    {
      "resCardType": "체크/본인",
      "resValidPeriod": "",
      "resCardName": "OO체크카드",
      "resTrafficYN": "불가능",
      "resIssueDate": "",
      "resUserNm": "***",
      "resSleepYN": "",
      "resCardNo": "4214********0000"
    }
  ]
}

Keywords

FAQs

Last updated on 25 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc