频道支付节点 SDK
Channel Pays为开发者提供方便用户的SDK,旨在简化与Channel Pays API的集成过程.
这个SDK提供了一系列工具和功能,可以简化我们在您的应用程序中的支付功能的应用. 关于使用具体方法的说明,请参见“开始”一节中的API指南.
安装
npm i @ 频道支付/ 节点- sdk
使用量
import { ChannelPaymentsApi } from "@channelpayments/node-sdk";
import * as fs from 'fs';
const channelPaymentsApi = new ChannelPaymentsApi({
keyId: '<integration key id>',
privateKey: fs.readFileSync('</path/to/... integration pem file', 'utf8'),
environment: '<**optional**, set to "sandbox" for sandbox testing>',
});
export async function getMerchant() {
const result = await channelPaymentsApi.getMerchant();
console.log('Merchant', result);
}