Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
This is unofficial SDK to use LINE Pay inside the node.js based application on top of express framework.
Go to LINE Pay Developers and create your sandbox. You can retrieve Channel Id and Channel Secret Key after successful login to LINE Pay Console. You also need to configure white lists of server ip addresses which access to LINE Pay API.
$ npm install --save line-pay
Here is extremely basic server configuration to start payment flow.
"use strict";
const app = require("express")();
const uuid = require("uuid/v4");
const line_pay = require("line-pay");
const pay = new line_pay({
channelId: process.env.LINE_PAY_CHANNEL_ID,
channelSecret: process.env.LINE_PAY_CHANNEL_SECRET,
isSandbox: true
});
app.listen(process.env.PORT || 5000, () => {
console.log(`server is listening to ${process.env.PORT || 5000}...`);
});
app.use("/pay", pay.middleware({
productName: "demo product",
amount: 1,
currency: "JPY",
orderId: uuid()
}), (req, res, next) => {
// Now payment should have been completed.
res.send("Payment has been completed.");
});
When you open browser and access to https://YOUR_HOSTNAME/pay, it starts payment flow by reserving payment and redirect you to authorization screen.
When you approve the payment, you redirect back to https://YOUR_HOSTNAME/pay/confirm and the server actually captures the payment.
You can control the flow by using individual methods like reserve() or confirm() in the SDK.
For more methods, refer to API reference. Demo & Sample code to use LINE Pay inside chatbot would be a good reference for Bot developers.
FAQs
SDK to use LINE Pay API in node.js app
We found that line-pay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.