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

ghost-payment-service

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghost-payment-service - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

20

lib/stripe/stripeService.js

@@ -84,2 +84,3 @@ 'use strict';

* @param {object} data
* @param {string} data.id
* @param {int} data.amount

@@ -246,4 +247,23 @@ * @param {string} data.interval

}
/**
* @param {object} data
* @param {id} data.planId
* @param {string} data.name
* @param {object} data.metadata
* @param {string} data.metadata.description
* @return Promise
*/
updatePlan (data) {
return new Promise((resolve, reject) => {
let planData = { name : data.name };
if (data.metadata && data.metadata.description) planData.metadata = data.metadata;
this._stripe.plans.update(data.planId, planData, (err, plan) => {
if (err) reject(err);
else resolve(plan);
})
})
}
}
module.exports = StripeService;

2

package.json
{
"name": "ghost-payment-service",
"version": "1.2.0",
"version": "1.2.1",
"description": "nodejs client to interact with the authorize.net & stripe apis",

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

@@ -141,2 +141,30 @@ const Chai = require('chai');

<<<<<<< HEAD
describe('plans', () => {
it('should create a plan', () => {
const id = Chance.natural({min: 10000000, max: 99999999});
const plan = {
amount: 10000,
id: id,
interval: "month",
name: "New Test Plan",
currency: "usd",
metadata: {
description: "This plan is a test."
},
trial_period_days: 1
};
return service.createPlan(plan)
.then(_plan_ => {
console.log('plan', _plan_);
expect(_plan_).to.exist;
expect(_plan_).id.to.be.equal(id);
})
})
})
=======
>>>>>>> 6a67f0ce8172f445c0d0d4e570a7e0650f4da686
});

@@ -143,0 +171,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