medusa-payment-stripe
Advanced tools
Comparing version 1.0.14-alpha.176 to 1.0.14-alpha.177
@@ -12,4 +12,8 @@ "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; | ||
@@ -16,0 +20,0 @@ return regeneratorRuntime.wrap(function _callee$(_context) { |
{ | ||
"name": "medusa-payment-stripe", | ||
"version": "1.0.14-alpha.176+0646bd3", | ||
"version": "1.0.14-alpha.177+0aefef8", | ||
"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.176+0646bd3" | ||
"medusa-test-utils": "^1.0.12-alpha.177+0aefef8" | ||
}, | ||
@@ -44,6 +44,6 @@ "scripts": { | ||
"express": "^4.17.1", | ||
"medusa-core-utils": "^1.0.12-alpha.787+0646bd3", | ||
"medusa-core-utils": "^1.0.12-alpha.788+0aefef8", | ||
"stripe": "^8.50.0" | ||
}, | ||
"gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" | ||
"gitHead": "0aefef896b367544c3a46c2211e7ca09041e3577" | ||
} |
@@ -18,3 +18,3 @@ "use strict"; | ||
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); } | ||
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); } | ||
@@ -39,4 +39,32 @@ 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) { 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); }; } | ||
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; | ||
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); } | ||
@@ -46,4 +74,2 @@ | ||
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); } | ||
@@ -53,3 +79,5 @@ | ||
var StripeProviderService = /*#__PURE__*/function (_PaymentService) { | ||
var StripeProviderService = | ||
/*#__PURE__*/ | ||
function (_PaymentService) { | ||
_inherits(StripeProviderService, _PaymentService); | ||
@@ -105,3 +133,5 @@ | ||
value: function () { | ||
var _getStatus = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(paymentData) { | ||
var _getStatus = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee(paymentData) { | ||
var id, paymentIntent, status; | ||
@@ -185,3 +215,5 @@ 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; | ||
@@ -233,3 +265,5 @@ 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) { | ||
@@ -272,3 +306,5 @@ while (1) { | ||
value: function () { | ||
var _createCustomer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(customer) { | ||
var _createCustomer = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee4(customer) { | ||
var stripeCustomer; | ||
@@ -332,4 +368,6 @@ return regeneratorRuntime.wrap(function _callee4$(_context4) { | ||
value: function () { | ||
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; | ||
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; | ||
@@ -345,4 +383,4 @@ return regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
case 3: | ||
_yield$this$regionSer = _context5.sent; | ||
currency_code = _yield$this$regionSer.currency_code; | ||
_ref2 = _context5.sent; | ||
currency_code = _ref2.currency_code; | ||
_context5.next = 7; | ||
@@ -374,3 +412,3 @@ return this.totalsService_.getTotal(cart); | ||
if (!((_customer$metadata = customer.metadata) === null || _customer$metadata === void 0 ? void 0 : _customer$metadata.stripe_id)) { | ||
if (!((_customer$metadata = customer.metadata) !== null && _customer$metadata !== void 0 && _customer$metadata.stripe_id)) { | ||
_context5.next = 17; | ||
@@ -440,3 +478,5 @@ 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) { | ||
@@ -477,3 +517,5 @@ 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) { | ||
@@ -516,3 +558,5 @@ while (1) { | ||
value: function () { | ||
var _authorizePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(sessionData) { | ||
var _authorizePayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee8(sessionData) { | ||
var context, | ||
@@ -559,3 +603,5 @@ 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) { | ||
@@ -597,3 +643,5 @@ 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; | ||
@@ -654,3 +702,5 @@ | ||
value: function () { | ||
var _deletePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(payment) { | ||
var _deletePayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee11(payment) { | ||
var id; | ||
@@ -700,3 +750,5 @@ 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) { | ||
@@ -739,3 +791,5 @@ while (1) { | ||
value: function () { | ||
var _capturePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(payment) { | ||
var _capturePayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee13(payment) { | ||
var id; | ||
@@ -779,3 +833,5 @@ 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; | ||
@@ -825,3 +881,5 @@ 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; | ||
@@ -828,0 +886,0 @@ return regeneratorRuntime.wrap(function _callee15$(_context15) { |
@@ -20,3 +20,5 @@ "use strict"; | ||
var CartSubscriber = /*#__PURE__*/function () { | ||
var CartSubscriber = | ||
/*#__PURE__*/ | ||
function () { | ||
function CartSubscriber(_ref) { | ||
@@ -36,4 +38,8 @@ 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) { | ||
@@ -63,3 +69,5 @@ 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; | ||
@@ -80,3 +88,3 @@ | ||
if ((_cart$payment_session = cart.payment_sessions) === null || _cart$payment_session === void 0 ? void 0 : _cart$payment_session.length) { | ||
if ((_cart$payment_session = cart.payment_sessions) !== null && _cart$payment_session !== void 0 && _cart$payment_session.length) { | ||
_context2.next = 5; | ||
@@ -83,0 +91,0 @@ break; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
57509
1404
1
+ Addedcall-bound@1.0.3(transitive)
- Removedcall-bind@1.0.8(transitive)
- Removedcall-bound@1.0.2(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedset-function-length@1.2.2(transitive)