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

medusa-payment-stripe

Package Overview
Dependencies
Maintainers
2
Versions
838
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

medusa-payment-stripe - npm Package Compare versions

Comparing version 1.0.14-alpha.177 to 1.0.14-alpha.186

8

api/routes/hooks/stripe.js

@@ -12,8 +12,4 @@ "use strict";

var _default =
/*#__PURE__*/
function () {
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(req, res) {
var _default = /*#__PURE__*/function () {
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(req, res) {
var signature, event, stripeProviderService, paymentIntent, cartService, orderService, cartId, order, cart;

@@ -20,0 +16,0 @@ return regeneratorRuntime.wrap(function _callee$(_context) {

{
"name": "medusa-payment-stripe",
"version": "1.0.14-alpha.177+0aefef8",
"version": "1.0.14-alpha.186+ffc008f",
"description": "Stripe Payment provider for Meduas Commerce",

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

"jest": "^25.5.2",
"medusa-test-utils": "^1.0.12-alpha.177+0aefef8"
"medusa-test-utils": "^1.0.12-alpha.186+ffc008f"
},

@@ -44,6 +44,6 @@ "scripts": {

"express": "^4.17.1",
"medusa-core-utils": "^1.0.12-alpha.788+0aefef8",
"medusa-core-utils": "^1.0.12-alpha.801+ffc008f",
"stripe": "^8.50.0"
},
"gitHead": "0aefef896b367544c3a46c2211e7ca09041e3577"
"gitHead": "ffc008f0629ca410cbe702cb53635e8a4fefe665"
}

@@ -18,3 +18,3 @@ "use strict";

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

@@ -39,32 +39,4 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _createSuper(Derived) {
function isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
return true;
} catch (e) {
return false;
}
}
return function () {
var Super = _getPrototypeOf(Derived),
result;
if (isNativeReflectConstruct()) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

@@ -74,2 +46,4 @@

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

@@ -79,5 +53,3 @@

var StripeProviderService =
/*#__PURE__*/
function (_PaymentService) {
var StripeProviderService = /*#__PURE__*/function (_PaymentService) {
_inherits(StripeProviderService, _PaymentService);

@@ -133,5 +105,3 @@

value: function () {
var _getStatus = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(paymentData) {
var _getStatus = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(paymentData) {
var id, paymentIntent, status;

@@ -215,5 +185,3 @@ return regeneratorRuntime.wrap(function _callee$(_context) {

value: function () {
var _retrieveSavedMethods = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee2(customer) {
var _retrieveSavedMethods = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(customer) {
var methods;

@@ -265,5 +233,3 @@ return regeneratorRuntime.wrap(function _callee2$(_context2) {

value: function () {
var _retrieveCustomer = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3(customerId) {
var _retrieveCustomer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(customerId) {
return regeneratorRuntime.wrap(function _callee3$(_context3) {

@@ -306,5 +272,3 @@ while (1) {

value: function () {
var _createCustomer = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee4(customer) {
var _createCustomer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(customer) {
var stripeCustomer;

@@ -368,6 +332,4 @@ return regeneratorRuntime.wrap(function _callee4$(_context4) {

value: function () {
var _createPayment = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee5(cart) {
var customer_id, region_id, email, _ref2, currency_code, amount, intentRequest, _customer$metadata, customer, stripeCustomer, _stripeCustomer, paymentIntent;
var _createPayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(cart) {
var customer_id, region_id, email, _yield$this$regionSer, currency_code, amount, intentRequest, _customer$metadata, customer, stripeCustomer, _stripeCustomer, paymentIntent;

@@ -383,4 +345,4 @@ return regeneratorRuntime.wrap(function _callee5$(_context5) {

case 3:
_ref2 = _context5.sent;
currency_code = _ref2.currency_code;
_yield$this$regionSer = _context5.sent;
currency_code = _yield$this$regionSer.currency_code;
_context5.next = 7;

@@ -412,3 +374,3 @@ return this.totalsService_.getTotal(cart);

if (!((_customer$metadata = customer.metadata) !== null && _customer$metadata !== void 0 && _customer$metadata.stripe_id)) {
if (!((_customer$metadata = customer.metadata) === null || _customer$metadata === void 0 ? void 0 : _customer$metadata.stripe_id)) {
_context5.next = 17;

@@ -478,5 +440,3 @@ break;

value: function () {
var _retrievePayment = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee6(data) {
var _retrievePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(data) {
return regeneratorRuntime.wrap(function _callee6$(_context6) {

@@ -517,5 +477,3 @@ while (1) {

value: function () {
var _getPaymentData = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee7(sessionData) {
var _getPaymentData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(sessionData) {
return regeneratorRuntime.wrap(function _callee7$(_context7) {

@@ -558,5 +516,3 @@ while (1) {

value: function () {
var _authorizePayment = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee8(sessionData) {
var _authorizePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(sessionData) {
var context,

@@ -603,5 +559,3 @@ stat,

value: function () {
var _updatePaymentData = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee9(sessionData, update) {
var _updatePaymentData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(sessionData, update) {
return regeneratorRuntime.wrap(function _callee9$(_context9) {

@@ -643,5 +597,3 @@ while (1) {

value: function () {
var _updatePayment = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee10(sessionData, cart) {
var _updatePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(sessionData, cart) {
var _cart$customer, _cart$customer$metada, stripeId;

@@ -702,5 +654,3 @@

value: function () {
var _deletePayment = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee11(payment) {
var _deletePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(payment) {
var id;

@@ -750,5 +700,3 @@ return regeneratorRuntime.wrap(function _callee11$(_context11) {

value: function () {
var _updatePaymentIntentCustomer = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee12(paymentIntentId, customerId) {
var _updatePaymentIntentCustomer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(paymentIntentId, customerId) {
return regeneratorRuntime.wrap(function _callee12$(_context12) {

@@ -791,5 +739,3 @@ while (1) {

value: function () {
var _capturePayment = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee13(payment) {
var _capturePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(payment) {
var id;

@@ -833,5 +779,3 @@ return regeneratorRuntime.wrap(function _callee13$(_context13) {

value: function () {
var _refundPayment = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee14(payment, amountToRefund) {
var _refundPayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(payment, amountToRefund) {
var id;

@@ -881,5 +825,3 @@ return regeneratorRuntime.wrap(function _callee14$(_context14) {

value: function () {
var _cancelPayment = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee15(payment) {
var _cancelPayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(payment) {
var id;

@@ -886,0 +828,0 @@ return regeneratorRuntime.wrap(function _callee15$(_context15) {

@@ -20,5 +20,3 @@ "use strict";

var CartSubscriber =
/*#__PURE__*/
function () {
var CartSubscriber = /*#__PURE__*/function () {
function CartSubscriber(_ref) {

@@ -38,8 +36,4 @@ var _this = this;

this.eventBus_ = eventBusService;
this.eventBus_.subscribe("cart.customer_updated",
/*#__PURE__*/
function () {
var _ref2 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(cart) {
this.eventBus_.subscribe("cart.customer_updated", /*#__PURE__*/function () {
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(cart) {
return regeneratorRuntime.wrap(function _callee$(_context) {

@@ -69,5 +63,3 @@ while (1) {

value: function () {
var _onCustomerUpdated = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee2(cartId) {
var _onCustomerUpdated = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(cartId) {
var _cart$payment_session;

@@ -88,3 +80,3 @@

if ((_cart$payment_session = cart.payment_sessions) !== null && _cart$payment_session !== void 0 && _cart$payment_session.length) {
if ((_cart$payment_session = cart.payment_sessions) === null || _cart$payment_session === void 0 ? void 0 : _cart$payment_session.length) {
_context2.next = 5;

@@ -91,0 +83,0 @@ break;

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