Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xendit-node

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xendit-node - npm Package Compare versions

Comparing version 1.14.0 to 1.15.0

4

package.json
{
"name": "xendit-node",
"version": "1.14.0",
"version": "1.15.0",
"description": "NodeJS client for Xendit API",

@@ -54,3 +54,3 @@ "main": "index.js",

"dependencies": {
"node-fetch": "^2.6.0"
"node-fetch": "^2.6.1"
},

@@ -57,0 +57,0 @@ "devDependencies": {

@@ -660,3 +660,3 @@ # Xendit API Node.js Client

channelCode?: ChannelCode;
channelProperties?: OVOChannelProps | PaymayaChannelProps | OtherChannelProps;
channelProperties?: ChannelProps;
customerID?: string;

@@ -663,0 +663,0 @@ basket?: Basket[];

@@ -34,16 +34,10 @@ import { XenditOptions } from '../xendit_opts';

interface OVOChannelProps {
mobileNumber: string;
interface ChannelProps {
mobileNumber?: string;
successRedirectURL?: string;
failureRedirectURL?: string;
cancelRedirectURL?: string;
redeemPoints?: string;
}
interface PaymayaChannelProps {
successRedirectURL: string;
failureRedirectURL: string;
cancelRedirectURL: string;
}
interface OtherChannelProps {
successRedirectURL: string;
}
interface Basket {

@@ -94,6 +88,3 @@ referenceID: string;

channelCode?: ChannelCode;
channelProperties?:
| OVOChannelProps
| PaymayaChannelProps
| OtherChannelProps;
channelProperties?: ChannelProps;
customerID?: string;

@@ -100,0 +91,0 @@ basket?: Basket[];

@@ -156,16 +156,11 @@ const {

channel_code: data.channelCode,
channel_properties:
data.channelCode === 'ID_OVO'
? {
mobile_number: data.channelProperties.mobileNumber,
}
: data.channelCode === 'PH_PAYMAYA'
? {
success_redirect_url: data.channelProperties.successRedirectURL,
failure_redirect_url: data.channelProperties.failureRedirectURL,
cancel_redirect_url: data.channelProperties.cancelRedirectURL,
}
: {
success_redirect_url: data.channelProperties.successRedirectURL,
},
channel_properties: data.channelProperties
? {
mobile_number: data.channelProperties.mobileNumber,
success_redirect_url: data.channelProperties.successRedirectURL,
failure_redirect_url: data.channelProperties.failureRedirectURL,
cancel_redirect_url: data.channelProperties.cancelRedirectURL,
redeem_points: data.channelProperties.redeemPoints,
}
: data.channelProperties,
customer_id: data.customerID,

@@ -172,0 +167,0 @@ basket: data.basket

@@ -43,2 +43,3 @@ enum Interval {

missedPaymentAction?: Action;
rescheduleAt?: Date;
}): Promise<object>;

@@ -80,2 +80,5 @@ const { promWithJsErr, Validate, fetchWithHTTPErr, Auth } = require('../utils');

missed_payment_action: data.missedPaymentAction,
reschedule_at: data.rescheduleAt
? data.rescheduleAt.toISOString()
: undefined,
}),

@@ -82,0 +85,0 @@ })

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc