New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

paymentjs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paymentjs - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

4

lib/response.js

@@ -25,3 +25,3 @@ 'use strict';

function Response(body) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { error: false, redirect: {} };
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { error: false, redirect: null };
var config = arguments[2];

@@ -63,3 +63,3 @@

value: function isRedirect() {
return this.options.redirect;
return this.options.redirect !== null;
}

@@ -66,0 +66,0 @@ }, {

{
"name": "paymentjs",
"version": "0.1.2",
"version": "0.1.3",
"description": "A framework agnostic, multi-gateway payment processing library for Node.js, Inspired by Omnipay for PHP",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -5,3 +5,3 @@ import _ from 'lodash'

export default class Response {
constructor(body, options = { error: false, redirect: {}}, config) {
constructor(body, options = { error: false, redirect: null}, config) {
this.body = body;

@@ -17,3 +17,3 @@ this.options = options;

isRedirect(){
return this.options.redirect;
return this.options.redirect !== null;
}

@@ -20,0 +20,0 @@ redirect(){

@@ -58,2 +58,5 @@ import { Alipay, Stripe } from '../src/gateways'

}), { source: card.id });
if (response.isRedirect()) {
console.log(await response.redirect());
}
if (await response.isSuccess()) {

@@ -60,0 +63,0 @@ console.log('success', '==-stripe-==', response.body);

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